Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

BUG: Firefox Narrate gone after TTS engine switch

  • No replies
  • 2 wana tatizo hili
  • 1 view
more options

TL;DR


I switched my TTS engine from espeak to pico and Firefox Narrate (the sound wave button) disappeared in reader view. My speech-dispatcher daemon is working correctly, so is the spd-say when called in the terminal.

Steps to reproduce


  1. install svox-pico-bin
  2. edit /etc/speech-dispatcher/speechd.conf
  3. uncomment AddModule "pico-generic" "sd_generic" "pico-generic.conf"
  4. change default module to DefaultModule pico-generic
  5. save config
  6. kill speech-dispatcher process for config to load

Expected behavior


Firefox using speech-dispatcher just like it was with eSpeak, the speech-dispatcher working like it used to but with different TTS engine.

Actual behavior


After Firefox restart the button for Narrate is gone even though dispatcher itself and all the other speech-dispatcher dependant apps work correctly. Firefox apparently makes an eSpeak check (?) even though it shouldn't matter which TTS engine the speech-dispatcher is using. Speech engine just isn't used any more. Setting DefaultModule back to espeak and killing the speech-dispatcher restores the old behaviour.

Extra information


Having config in ~/.config/speech-dispatcher can have negative impact on testing. I recommend removing it for the time of development. It can be easily restored with spd-conf CLI wizard later on.

Optional pico modifications


Pico can support volume, rate and pitch - I tested it on my machine. Install sox package (it needs /usr/bin/play) and apply patch to /etc/speech-dispatcher/modules/pico-generic.conf:

   --- pico-generic.conf   2017-11-20 23:18:43.957283842 +0100
   +++ pico-generic.conf.new       2017-11-20 23:25:52.744675918 +0100
   @@ -18,7 +18,11 @@
    # can modify this value, see other parameters).
    # The command can be split into more lines, if necessary, using '\'.
    GenericExecuteSynth \
   -"pico2wave -w $TMPDIR/pico.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico.wav
   +"picospeaker -l $VOICE -v $VOLUME -r $RATE -p $PITCH \'$DATA\'"
   +
   +GenericRateForceInteger 1
   +GenericPitchForceInteger 1
   +GenericVolumeMultiply 1
    
    # The following three items control punctuation levels None, Some, and All.
    # Each of these values will be substituted into the $PUNCT variable depending
'''TL;DR''' ----------- I switched my TTS engine from ''espeak'' to ''pico'' and Firefox Narrate (the sound wave button) disappeared in reader view. My ''speech-dispatcher'' daemon is working correctly, so is the ''spd-say'' when called in the terminal. '''Steps to reproduce''' ------------------------ # install ''svox-pico-bin'' # edit ''/etc/speech-dispatcher/speechd.conf'' # uncomment ''AddModule "pico-generic" "sd_generic" "pico-generic.conf"'' # change default module to ''DefaultModule pico-generic'' # save config # kill ''speech-dispatcher'' process for config to load '''Expected behavior''' ----------------------- Firefox using speech-dispatcher just like it was with eSpeak, the ''speech-dispatcher'' working like it used to but with different TTS engine. '''Actual behavior''' --------------------- After Firefox restart the button for Narrate is gone even though dispatcher itself and all the other ''speech-dispatcher'' dependant apps work correctly. Firefox apparently makes an eSpeak check (?) even though it shouldn't matter which TTS engine the ''speech-dispatcher'' is using. Speech engine just isn't used any more. Setting ''DefaultModule'' back to ''espeak'' and killing the ''speech-dispatcher'' restores the old behaviour. '''Extra information''' ----------------------- Having config in ''~/.config/speech-dispatcher'' can have negative impact on testing. I recommend removing it for the time of development. It can be easily restored with ''spd-conf'' CLI wizard later on. '''Optional pico modifications''' --------------------------------- Pico can support volume, rate and pitch - I tested it on my machine. Install ''sox'' package (it needs ''/usr/bin/play'') and apply patch to ''/etc/speech-dispatcher/modules/pico-generic.conf'': --- pico-generic.conf 2017-11-20 23:18:43.957283842 +0100 +++ pico-generic.conf.new 2017-11-20 23:25:52.744675918 +0100 @@ -18,7 +18,11 @@ # can modify this value, see other parameters). # The command can be split into more lines, if necessary, using '\'. GenericExecuteSynth \ -"pico2wave -w $TMPDIR/pico.wav -l $VOICE \'$DATA\' && $PLAY_COMMAND $TMPDIR/pico.wav +"picospeaker -l $VOICE -v $VOLUME -r $RATE -p $PITCH \'$DATA\'" + +GenericRateForceInteger 1 +GenericPitchForceInteger 1 +GenericVolumeMultiply 1 # The following three items control punctuation levels None, Some, and All. # Each of these values will be substituted into the $PUNCT variable depending

Modified by cprn