1

I have a problem with converting from "wav" to "flac".

Command:

arecord -D plughw:0,0 -f cd -t wav -d 0 -q -r 16000 | flac - -s -f --best --sample-rate 16000 -o daveconroy.flac

Always gives:

ERROR: raw format options (--endian, --sign, --channels, --bps, and --sample-rate) are not allowed for non-raw input

While I can record with the following command, playback is extremely noisy:

arecord -t raw -f S16_LE -r 8000 | flac - -f --endian little --sign unsigned --channels 1 --bps 16 --sample-rate 8000 -s -c -o test.flac

Project link: https://daveconroy.com/how-to/turn-raspberry-pi-translator-speech-recognition-playback-60-languages/

https://makezine.com/projects/universal-translator/

I have searched with my colleague for hours, unfortunately unsuccessfully, and have also tried with sox.

Maybe there is a Linux professional among you who can help me.

terdon
  • 234,489
  • 66
  • 447
  • 667
  • Does it work if you just don't use the `--sample-rate` option in your first command? That's what the error seems to be suggesting. What happens with `arecord -D plughw:0,0 -f cd -t wav -d 0 -q -r 16000 | flac - -s -f --best -o daveconroy.flac`? – terdon Jul 16 '21 at 15:52
  • Nothing happens. It just stands still. No error message – chilyourlifefist Jul 16 '21 at 16:06

0 Answers0