obsidian-tts
obsidian-tts copied to clipboard
Android Obsidian 1.4.0, the language specific voices of Text to Speech can not select voice
Android Obsidian 1.4.0, the language specific voices of Text to Speech can not select voice, while the Obsidian 1.0 for windows works well.
This plugin does not work at all on Android. See the README and #8
This plugin does not work at all on Android. See the README and #8
Thanks a lot. I will report it to the development team of Obsidian to see if it can support TTS for Android environment.
No, we can't (I am also part of that team) The issue is with Android itself, see the link the README.
Thanks for replying, I'm not a programmer. But I read the README and the link inside to https://bugs.chromium.org/p/chromium/issues/detail?id=487255 .
I found the comment as follows, "But the problem I had was solvable":
Comment 62 by [email protected] on Mon, Jun 21, 2021, 6:54 AM GMT+8 I might have misunderstood the purpose of this issue. But the problem I had was solvable.
I was using utterance.voice which is only wrong on Android Chrome. The following snippet is broken.
let utterance = new SpeechSynthesisUtterance("hello");
let voice = speechSynthesis.getVoices()[0]
utterance.voice = voice;
speechSynthesis.speak(utterance);
That works on Chrome Windows, iOS, MacOS, Firefox Android, but doesn't work on Android Chrome. The following works on all platforms I tested. To test in the console, you might have to run it twice to make sure the voices are loaded:
let utterance = new SpeechSynthesisUtterance("hello");
let voice = speechSynthesis.getVoices()[0]
utterance.voice = voice; // required for iOS
utterance.lang = voice.lang; // required for Android Chrome
utterance.voiceURI = voice.voiceURI; // unclear if needed
speechSynthesis.speak(utterance);
And you should hear a non-native accent saying "hello".
let utterance = new SpeechSynthesisUtterance("hello"); let voice = speechSynthesis.getVoices()[0] utterance.voice = voice; // required for iOS utterance.lang = voice.lang; // required for Android Chrome utterance.voiceURI = voice.voiceURI; // unclear if needed speechSynthesis.speak(utterance);And you should hear a non-native accent saying "hello".
BTW, I tried the quoted workaround, but it didn't resolve the issue. It's a shame, it would really benefit me to listen to my vault while on the go 😞