-1

I have a problem with convert 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 get the error message:

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

But with the following command I can record it, but 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 unsuccessful, also already tried with sox.

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

2
  • 1
    why aren't you asking at a linux site?
    – jsotola
    Jul 16 '21 at 14:53
  • Surely there is someone in this world who has this project from daveconroy in operation or has fixed the problem. The project (see link) is made with a Raspberry Pi. Linux helper website: unix.stackexchange.com? Do you know any other websites? Jul 16 '21 at 15:42
1

This may not answer your question, but I've never used arecord - all I can offer is this:

install ffmpeg in the "usual way":

$ sudo apt-get update  
...
$ sudo apt-get full-upgrade 
...
$ sudo apt-get install ffmpeg
...

Once installed, you should be able to convert your .wav file to a .flac file as follows:

ffmpeg -i "Your WAV file.wav" -c:a flac "Your WAV file-converted.flac"

Hope that helps. FYI, SE also has a "Sound Design" site where you may find more specific help.

2
  • How can I use this command with your suggested 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 ffmpeg -i "Your WAV file.wav" -c:a flac "Your WAV file-converted.flac" Jul 17 '21 at 8:21
  • @chilyourlifefist: I'm not sure they can be used together. The command in my answer was intended to be used to convert an existing .wav file to a .flac file. That was my understanding of your question.
    – Seamus
    Jul 17 '21 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.