Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any voices with "(natual)" fail to be used to speak #242

Closed
MRYingLEE opened this issue Dec 19, 2023 · 5 comments · Fixed by #254
Closed

Any voices with "(natual)" fail to be used to speak #242

MRYingLEE opened this issue Dec 19, 2023 · 5 comments · Fixed by #254
Labels
bug Something isn't working Edge

Comments

@MRYingLEE
Copy link

Describe the bug
Any voices with "(natual)" fail to be used to speak

To Reproduce
Steps to reproduce the behavior:
In your online demo, try to pick up any voice with "(natual)", such as "Maisie". Then nothing is spoke out while other non-natual voices work.

I tested on Microsoft Edge v.121.

Expected behavior
All voices can be used.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Edge
  • Version: 121

I tried to following

// Get the voices available 
const voices = window.speechSynthesis.getVoices();

const textToSpeak = "This project was created, because it's always a struggle to get the synthesis part of Web Speech API running on most major browsers.";
// Create a new SpeechSynthesisUtterance object
const utterance = new SpeechSynthesisUtterance(textToSpeak);
// Find the voice that includes "Maise"
let maiseVoice = voices.find(voice => voice.name.includes("Maisie"));

if (maiseVoice === undefined)
  maiseVoice=voices[0];
// Set the voice and other parameters
utterance.voice = maiseVoice; // Use the first voice available
utterance.pitch = 1;
utterance.rate = 1; 

// Speak the text
window.speechSynthesis.speak(utterance);

in https://playcode.io/1699188. The voice works well.

So this must be a new bug for a few months ago every voice worked.

@jankapunkt
Copy link
Owner

Thank you @MRYingLEE for reporting this. Is there any notable output in the debug log panel in the Demo page when attempting to play these voices?

@MRYingLEE
Copy link
Author

For "Maisie", the debug log is as the following:
is android: false
is firefox: false
is safari: false
init: start
is android: false
is firefox: false
is safari: false
init: voices
init: voices (onvoiceschanged)
voices loaded: 312
init: complete
find unique languages...
found 74 languages
populate languages to select component
attach events, cleanup
voices loaded: 312
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft George - English (United Kingdom) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
resumeInfinity isSpeaking=true isPaused=false
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: end
speak complete
init speak
utterance: voice=Microsoft Maisie Online (Natural) - English (United Kingdom) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Maisie Online (Natural) - English (United Kingdom) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete

=====================================
For Microsoft George - English (United Kingdom), the debug log is as the following:

DEBUG LOG
is android: false
is firefox: false
is safari: false
init: start
is android: false
is firefox: false
is safari: false
init: voices
init: voices (onvoiceschanged)
voices loaded: 312
init: complete
find unique languages...
found 74 languages
populate languages to select component
attach events, cleanup
voices loaded: 312
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Elimu Online (Natural) - English (Tanzania) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft George - English (United Kingdom) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
resumeInfinity isSpeaking=true isPaused=false
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: end
speak complete
init speak
utterance: voice=Microsoft Maisie Online (Natural) - English (United Kingdom) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft Maisie Online (Natural) - English (United Kingdom) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: end
speak complete
init speak
utterance: voice=Microsoft George - English (United Kingdom) volume=1 rate=1 pitch=1
event: start
resumeInfinity isSpeaking=true isPaused=false
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
resumeInfinity isSpeaking=true isPaused=false
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: boundary
event: end
speak complete

@jankapunkt
Copy link
Owner

I can confirm this, however I can't find the root cause, I need more investigation on this, especially since there is a setup that works.

@jankapunkt
Copy link
Owner

@MRYingLEE coming back to this I found the root cause and fixed it in #254

Please do the following:

  • open the DEMO page, make sure your Edge browser has cache emptied in order to have the demo loading the latest js
  • select one of the (Natural) voices
  • speak some text
  • it should work!

if it's not working:

  • make sure the log when speaking contains isMsNatural=true
  • make sure the log DOES NOT contain resumeInfinity
  • otherwise make sure you emptied your browser cache, close the browser and reopen until it's working

Finally:

@MRYingLEE
Copy link
Author

The issue has gone with the new version.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Edge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants