-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
questionIndicates that issue is a question.Indicates that issue is a question.
Description
I am using the built-in feature for text-to-speech (speechSynthesis)
I need the Female voice and I got that using voiceUrl: Google US English
But that speaks only about 2 sentences.
What is the problem?
This is my Next.js Code
const utterance = new SpeechSynthesisUtterance(message.content);
// const voices = speechSynthesis.getVoices().filter(voice => voice.lang.startsWith("en") && voice.name.includes('Female'));
console.log(speechSynthesis.getVoices())
const voices = speechSynthesis.getVoices().filter(voice => voice.voiceURI === 'Google US English');
if (voices.length > 0) {
utterance.voice = voices[0];
}
window.speechSynthesis.speak(utterance);
setSpeaking(true);Metadata
Metadata
Assignees
Labels
questionIndicates that issue is a question.Indicates that issue is a question.