Different browsers output different sexes in text to speech, some male some female. Same code. I would like to know how to choose the sex of the voice, please. speech.gender=”female”; does not work, some browsers it still comes out male.
Here is a list of language codes, []
“`
function textToAudio() {
let speech = new SpeechSynthesisUtterance();
speech.lang = “en-US”;
//speech.gender=”female”;
speech.text = (“Hello”);
speech.volume = 1;
speech.rate = 1;
speech.pitch = 1;
window.speechSynthesis.speak(speech);
}