Well. I read the workaround. The problem is if you use file source and
file
sink instead of wav file source and wav file sink, you are not
generating a
wav file. You can name it *.wav, but it isn’t a wav file at all.
What I want to do is generating a wav file wich can be playd with any
wav
player (that I can do with wav file sink) and been able to use it again
in
gnu radio (wich does not work with file wav file source).
I’ve tried 8 and 16 bits and different data rate
Hi fffdddoo (is that really the name by which we should address you?),
I’m guessing you try to save audio directly from the audio source to a
wav file, right?
So, my blind guess is that Baokum wrongly configured the audio source
and simply nothing came out of it.
For example, no soundcard normally uses a sampling rate of 32kHz. A
typical rate is 44.1kHz.
You might want to check your console output for errors. Most of the
time, the audio sink complains about things like the device name not
working or something else going wrong; this all depends very much on
which operating system you use GNU Radio.
Do you get any errors?
Of course, when using a file_sink you don’t generate a wav file, that’s
why we have the WAV sink
You can address me by Fernando, it’s easier to pronounce
I’m trying to save audio from the audio source to a file or from a
signal
source 1Khz for instance.
I’ve tryed different things, and different data rate (I’ve tried 44100
also)
and is always the same eror
Generating: “/home/ubuntu/top_block.py”
Executing: “/home/ubuntu/top_block.py”
Traceback (most recent call last):
File “/home/ubuntu/top_block.py”, line 51, in
tb = top_block()
File “/home/ubuntu/top_block.py”, line 33, in init
self.blocks_wavfile_source_0 =
blocks.wavfile_source(“/home/ubuntu/prueba.wav”, True)
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/blocks/blocks_swig0.py”,
line 1418, in make
return _blocks_swig0.wavfile_source_make(*args, **kwargs)
RuntimeError: WAV file does not contain any samples
Done
But i have converted a mp3 file to wav with mpg123 and the file plays
well
using wav file source.
Moreover: i’ve converted a file with mpg123 to a wav file at 22Ksps and
it
works too.
And The file wav generated in gnuradio with wav file source is a valid
wav
file which I can play with amarok.
So the problem is that wav file source does not recognice the files
created
by wav file sink altough they seem to be fully valid files.
regards
Marcus Müller-3 wrote
You might want to check your console output for errors. Most of the