Open Bug 1821875 Opened 3 years ago Updated 3 years ago

Allow Speech Dispatcher to manage voices

Categories

(Core :: Web Speech, defect)

Firefox 110
Unspecified
Linux
defect

Tracking

()

UNCONFIRMED

People

(Reporter: roman, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0

Steps to reproduce:

I configured Speech Dispatcher with multiple modules. Here are the lines that I uncommented or added in /etc/speech-dispatcher/speechd.conf

AddModule "espeak-ng" "sd_espeak-ng" "espeak-ng.conf"
AddModule "festival" "sd_festival" "festival.conf"
DefaultModule festival
LanguageDefaultModule "en" "festival"
LanguageDefaultModule "uk" "espeak-ng"

On my system, I also had to modify the festival voice file a little, so that it would show itself as English, as well as enable and run festival as a systemd service to make it available to Speech Dispatcher.

I tested my setup with spd-say -L --language followed by the language code and a text to utter.

My system details:
Firefox 110.0 (64 bit) from Fedora official rpm repository
Fedora Linux 37
speech-dispatcher 0.11.4
eSpeak NG 1.51.1
Festival Speech Synthesis System 2.5.0

Actual results:

Firefox in the reading view provides speech synthesis only for pages in English so that no voices from "espeak-ng" module are available. If I comment out DefaultModule line, Firefox provides speech synthesis for pages in English, Ukrainian, German and other languages but uses only the voices from "espeak-ng" module and not from "festival". It appears that Firefox defines voices only once per session and does not indicate to Speech Dispatcher the language, so it gets the list of voices only from the default module. Here is an example output for the configuration above.

$ MOZ_LOG="SpeechSynthesis:5" firefox
[Parent 9598: Main Thread]: D/SpeechSynthesis nsSynthVoiceRegistry::AddVoice uri='urn:moz-tts:speechd:cmu_us_slt_cg?en-US' name='cmu_us_slt_cg' lang='en-US' local=false queued=true
[Child 9885: Main Thread]: D/SpeechSynthesis SpeechSynthesis::onvoiceschanged
[Child 9885: Main Thread]: D/SpeechSynthesis SpeechSynthesis::AdvanceQueue length=0

Expected results:

I expected that Firefox would provide speech synthesis:

  • for pages in English with a voice from "festival" module and
  • for pages in Ukrainian and other languages with voices from "espeak-ng" module.

Firefox should allow the Speech Dispatcher to determine the voice since it is the job of the Speech Dispatcher. Thus, it should pass the language code to the Speech Dispatcher at least on a page-by-page basis. I would expect that passing it with each request is more appropriate because some parts of a page might be marked up in a different language.

The Bugbug bot thinks this bug should belong to the 'Core::Internationalization' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Internationalization
Product: Firefox → Core

fyi. Alexa is planning to propose to Unicode extension of BCP47 to allow for similar scope of en-US-v-tn-casual-vs-male etc.
May be a good idea to coordinate and happy to make intros.

The severity field is not set for this bug.
:m_kato, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(m_kato)
Component: Internationalization → Web Speech
Flags: needinfo?(m_kato)
OS: Unspecified → Linux

It seems to depends on SpeechDispatcherService

The severity field is not set for this bug.
:anatal, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(anatal)
Severity: -- → S3
Flags: needinfo?(anatal)
You need to log in before you can comment on or make changes to this bug.