StevenHickson / PiAUISuite

Raspberry PI AUI Suite
Other
695 stars 203 forks source link

arecord / audio rate #9

Closed ut666 closed 10 years ago

ut666 commented 11 years ago

Just a small issue, it would be nice to make the sampling rate, -r parameter of arecord external to your voicecommand binary.

I had issues with the default "-r 16000" with my Philips Toucam 740K which only support: mono, 16 bit, 8 / 11.025 / 22.05 / 44.1 kHz

So changing everything to 44100 and recompiling did the trick.

Otherwise cool plugin! And thanks for sharing.

ut.

ut666 commented 11 years ago

Actually digging a bit further, it was the channel mode, it was by default trying to record in stereo, which my webcam does not support. Or did partially....

Adding the "-c 1" to all arecord commands to force mono, solved my recording issues. It actually works fine with the 16000 sampling rate now.

I also had issues with the tts script, where mpg123 wasn't able to playback the mp3. The file was fetched correctly from google, but I just could play it back. Adding "-r 44100" to the mpg123 command fixed this.

All working as it should now! Thanks.

ut.

computaholic commented 11 years ago

In my opinion, all 'shell' commands should reside in external scripts. People can adjust record and play mechanisms easier and the program is easier to maintain.