Page 1 of 1
TexttoSpeech for iOS
Posted: Fri Aug 18, 2023 9:51 pm
by Aduro91
Hi all,
I've downloaded and installed the LiveCode-Extension-iOS-SpeechSynthetizer and enabled for my project properly (I think). See here
https://github.com/SwissEduHack/LiveCod ... ynthetizer
However, I'm not sure how to work the 'EdHSpeak' command as it doesn't seem to be working. Does anyone know how I would go about using this extension?
Re: TexttoSpeech for iOS
Posted: Fri Aug 18, 2023 11:06 pm
by jmburnod
Hi,
SpeechSynthetizer was created before LiveCode speech library for iOS.
Disadvantage of SpeechSynthetizer is it doesn’t work on IDE and you have to make an iOS standalone to test it.
That is not the case with the LiveCode speech library for iOS.
On other side SpeechSynthetizer knows Pause/Resume but not LiveCode speech library for iOS.
EdHSpeak is a function.
You have to define value for rate, pitch, volume, voice
Rate between 0 and 1
Pitch between 0.5 and 2
Volume between 0 and 1
Voice (one of the voices in the list returned by getVoices() or language and locale like "fr-FR")
Code: Select all
…
put 0.4 into tRate
put 0.88 into tPitch
put 1 into tPitch
put Thomas into tVoice
put EdHSpeak( tRate, tPitch,tVol, tVoice, theText) into tToSay
...
Best regards
Jean-Marc
…
Re: TexttoSpeech for iOS
Posted: Sat Aug 19, 2023 12:19 pm
by Aduro91
jmburnod wrote: ↑Fri Aug 18, 2023 11:06 pm
Hi,
SpeechSynthetizer was created before LiveCode speech library for iOS.
Disadvantage of SpeechSynthetizer is it doesn’t work on IDE and you have to make an iOS standalone to test it.
That is not the case with the LiveCode speech library for iOS.
On other side SpeechSynthetizer knows Pause/Resume but not LiveCode speech library for iOS.
EdHSpeak is a function.
You have to define value for rate, pitch, volume, voice
Rate between 0 and 1
Pitch between 0.5 and 2
Volume between 0 and 1
Voice (one of the voices in the list returned by getVoices() or language and locale like "fr-FR")
Code: Select all
…
put 0.4 into tRate
put 0.88 into tPitch
put 1 into tPitch
put Thomas into tVoice
put EdHSpeak( tRate, tPitch,tVol, tVoice, theText) into tToSay
...
Best regards
Jean-Marc
…
Thanks very much Jean-Marc.
This particular line will be helpful I think 'put EdHSpeak( tRate, tPitch,tVol, tVoice, theText) into tToSay' because I was having some issues using the version of this function from the Read Me. I'm sure it was my own beginner-level confusion though.
I will look into speech library as that might be all I need.
Thanks again!
Re: TexttoSpeech for iOS
Posted: Sat Aug 19, 2023 3:42 pm
by Aduro91
jmburnod wrote: ↑Fri Aug 18, 2023 11:06 pm
Hi,
SpeechSynthetizer was created before LiveCode speech library for iOS.
Disadvantage of SpeechSynthetizer is it doesn’t work on IDE and you have to make an iOS standalone to test it.
That is not the case with the LiveCode speech library for iOS.
On other side SpeechSynthetizer knows Pause/Resume but not LiveCode speech library for iOS.
EdHSpeak is a function.
You have to define value for rate, pitch, volume, voice
Rate between 0 and 1
Pitch between 0.5 and 2
Volume between 0 and 1
Voice (one of the voices in the list returned by getVoices() or language and locale like "fr-FR")
Code: Select all
…
put 0.4 into tRate
put 0.88 into tPitch
put 1 into tPitch
put Thomas into tVoice
put EdHSpeak( tRate, tPitch,tVol, tVoice, theText) into tToSay
...
Best regards
Jean-Marc
…
I have another question if you might perhaps be able to answer.
With speech library, are you aware of any way to input phonetics rather than whole words? I found the following thread
https://forums.livecode.com/viewtopic.php?t=31113 on this question which uses an example referring to the old RevSpeak command:
Revspeak "[[inpt PHON]]"&"1pAA_k>IXIX_"
I've tried this for the speechSpeakUtterance context but it doesn't seem to work.
Cheers!