glutanimate / simple-google-tts

Use Google text-to-speech on your Linux desktop
GNU General Public License v3.0
119 stars 32 forks source link

Only works with -p flag with active internet connection #1

Closed kkremitzki closed 10 years ago

kkremitzki commented 10 years ago

Hey, so I followed the instructions in the readme. I only hear sound output when I add the -p flag, but there isn't an error message to try to diagnose my issue. Here's what happens:

$ ./simple_google_tts en "Hello World" Reading from string. Using Google for TTS synthesis. Synthesizing virtual speech. Processing 1 out of 1 paragraphs Playing synthesized speech 1 All sections processed. Waiting for playback to finish. $

No sound.

$ ./simple_google_tts -p en "Hello World" Reading from string. Using pico2wave for TTS synthesis. Synthesizing virtual speech. Playing synthesized speech

.. a pause as the sound plays ..

$

glutanimate commented 10 years ago

Thanks for the bug report!

The CLI output isn't very verbose by default and I haven't added a debug switch, unfortunately.

Would you be wiling to test something out for me, please? Could you remove the > /dev/null 2>&1redirections in lines 240, 260, and 290 in simple_google_tts and then run the script again? If there are any errors they should appear now.

Oh, and please be careful not to remove the & at the end of line 260.

kkremitzki commented 10 years ago

Results:

$ ./simple-google-tts en "Hello World" Reading from string. Using Google for TTS synthesis. Synthesizing virtual speech. Processing 1 out of 1 paragraphs Can't locate WWW/Mechanize.pm in @INC (you may need to install the WWW::Mechanize module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at /home/kurt/Workspace/simple-google-tts/speak.pl line 142. BEGIN failed--compilation aborted at /home/kurt/Workspace/simple-google-tts/speak.pl line 142. Playing synthesized speech 1 All sections processed. Waiting for playback to finish. play FAIL formats: can't open input file `out_0.mp3': No such file or directory

Fixed by:

perl -MCPAN -e shell

cpan[1]> install WWW::Mechanize

That was easy! Thanks!

glutanimate commented 10 years ago

Thanks for tracking this down!

I will add libwww-mechanize-perl to the dependency list. Looks like Michal Fapso just forgot to mention it in the documentation for speak.pl.

glutanimate commented 10 years ago

Fixed with 59f21c79ca94e969d5273efa1f9def9665b66708.