zaf / asterisk-googletts

Asterisk AGI script that uses Google's translate text to speech service.
GNU General Public License v2.0
214 stars 125 forks source link

Downloaded mp3 contains only noise #8

Closed gianiaz closed 10 years ago

gianiaz commented 10 years ago

I'm trying v.0.6 of your script, but the downloaded file from google server is "corrupted".

I've tried commenting this line:

unlink glob "$tmpname*";

Then I can find the downloaded wav in tmp/.

If you want to listen this is the result:

https://www.dropbox.com/s/y9rho2up4iwd0cd/test.wav

If I visit composed url ($url?tl=$lang&q=$line) with browser I can hear the right message.

Do you have an idea on what's happening?

gianiaz commented 10 years ago

I'm using beaglebone black, and I've found that the source of the error is the mpg123 conversion. I've tried uninstalling mpg123 and compiling from source, but nothing has changed.

Anyway this is not related to this script.

zaf commented 10 years ago

Hello,

I am aware of the issue, it has to do with mpg123 fpu related optimizations and the specific CPU or the gcc compiler. Try rebuilding it like this:

./configure --with-cpu=generic_nofpu

gianiaz commented 10 years ago

Thank you very much zaf, It took a day to understand what was the cause and with your help I've solved in 5 minutes. :-)

pxto commented 10 years ago

Great work! Thank you very much for the solution. Remember to (sudo) apt-get purge --auto-remove mpg123 before rebuild otherwise nothing will change Thanx again.