Re: The basis for an xtalk engine we control
Posted: Sat Mar 15, 2025 8:07 pm
If you look at the JSON of one of the speech voice-objects you can see they have properties that indicate male/female/neutral, language, and region. This is important if you want pronunciations of specfiic words to sound a certain way. I'll often use an Female Australian English Voice for text-to-speech because it amuses me (I don't know why), but if I use something like a Female Chinese Mandarin or Male Brazilian Spanish voice then some word sound 'like arse' when trying to pronounce English words (also funny to me).
I don't know why Debian Linux browser wouldn't work for web speech, perhaps something to with Debian being strctly FOSS oriented/liscense issues? Or perhaps it doesn't install or doesn't turn on 'assistive technologies by default? I know Gecko (Firefox) engine counts on there being a TTS voice installed in the OS. I thought Google's Chrome used its own voices, but I could be wrong.
You're right It seems that the voice names returned by the API are formatted in a way that is inconsistent from one Browser engine to the next, but it's always some comination of a human name and optionally male/female/neutral, language, and regon (dialect). I don't think it matters much though because to select a voice the API takes the voice-object list index number, not a name, so you have to iterate through that list to find the voice object that matches it.
HyperTalk used 'the voice' for the selected voice, revSelectedVoice is the OXT engine equivelant.
HyperTalk:
speak tText with <gender> voice
the speech
stop speech
the voice to <voiceName>
the voices -- returns voice list
Also used soundChannel volume (iirc)
I think in HC 2.4.x there was some improvements to the syntax.
OpenXTalk:
revSpeak
revStopSpeech
revSetSpeechVoice voiceName
revSpeechVoices([voiceGender])
revLoadSpeech
revUnloadSpeech
revSetSpeechProvider speechProvider
revSetSpeechSpeed wordsPerMinute
revSetSpeechVolume volume
revSetSpeechPitch pitchLevel
I'm not sure which would be best to try to support, or maybe can create syntax-aliases to support multiple xTalk dialects?
Of course for revWhatever equivalents I would want to drop the 'rev' prefix, scripts would just need to search+replace " rev" with " ".
BTW, I noticed webtalk interpreter currently does not allow to use the function() format for properties.
put the platform --- works fine
put platform() -- does not work at all
I'm still using v100 so you probably fixed some things since with v104.
I don't know why Debian Linux browser wouldn't work for web speech, perhaps something to with Debian being strctly FOSS oriented/liscense issues? Or perhaps it doesn't install or doesn't turn on 'assistive technologies by default? I know Gecko (Firefox) engine counts on there being a TTS voice installed in the OS. I thought Google's Chrome used its own voices, but I could be wrong.
You're right It seems that the voice names returned by the API are formatted in a way that is inconsistent from one Browser engine to the next, but it's always some comination of a human name and optionally male/female/neutral, language, and regon (dialect). I don't think it matters much though because to select a voice the API takes the voice-object list index number, not a name, so you have to iterate through that list to find the voice object that matches it.
HyperTalk used 'the voice' for the selected voice, revSelectedVoice is the OXT engine equivelant.
HyperTalk:
speak tText with <gender> voice
the speech
stop speech
the voice to <voiceName>
the voices -- returns voice list
Also used soundChannel volume (iirc)
I think in HC 2.4.x there was some improvements to the syntax.
OpenXTalk:
revSpeak
revStopSpeech
revSetSpeechVoice voiceName
revSpeechVoices([voiceGender])
revLoadSpeech
revUnloadSpeech
revSetSpeechProvider speechProvider
revSetSpeechSpeed wordsPerMinute
revSetSpeechVolume volume
revSetSpeechPitch pitchLevel
I'm not sure which would be best to try to support, or maybe can create syntax-aliases to support multiple xTalk dialects?
Of course for revWhatever equivalents I would want to drop the 'rev' prefix, scripts would just need to search+replace " rev" with " ".
BTW, I noticed webtalk interpreter currently does not allow to use the function() format for properties.
put the platform --- works fine
put platform() -- does not work at all
I'm still using v100 so you probably fixed some things since with v104.