Page 1 of 1

LiveCode 9 and revSpeak (Mac 10.13, Win 10) Problems

Posted: Tue Aug 07, 2018 4:21 pm
by Entdecker
# LiveCode 9 and voice output under Mac OS 10.13 and Windows 10

Hello everyone, I have noticed numerous problems with the voice output with LiveCode 9. Especially I have big problems under Windows 10. Since RevSpeak is version 2, it seems to me that the operating systems have evolved, but RevSpeak has not been adapted to it. I hope to give an impulse that one of the next updates of LiveCode 9 will make progress here again. There are also entries in the documentation of LiveCode 9 that no longer correspond to reality.

## The summary

Under Windows 10, the following commands do not work or does not work correctly:
> revSpeechVoices()
> revIsSpeaking()

Under Mac OS, some parameters are not properly documented.

## In details

### revSpeechVoices()
This command gets the list of available speakers for voice output.
** The list of speakers on Windows10 in LiveCode is different from the list of speakers in System Preferences. In Livecode 9 under Win10 I only get Hedda (German), David (US) and Zira (US). **
Everything's fine on the Mac.

> revSpeechVoices(""). -- all voices on Mac, Windows (see above)
> revSpeechVoices("male") -- only male voices
> revSpeechVoices("female") -- only female voices
> revSpeechVoices("neuter") -- empty on Mac and Win; I thinks it's a very old command.

example:
> put revSpeechVoices() into field "fVoices"

### revSetSpeechVoice
Sets the speaker for the following voice output.

I tried to put the storedVoice into a variable or field, but it does not work under MacOS and Win10.

> put the storedVoice of this stack into tVoice -- tVoice is always empty
> get the storedVoice of this stack -- it is always empty

example:
> revSetSpeechVoice the storedVoice of this stack -- will use the speaker of the operating system; ** does not work under Win 10 **, but on the Mac it's fine.

### revSetSpeechSpeed
Sets the speed for the voice output. According to documentation, the speed is a number between 1 and 300 words per minute. The real usable numbers, however, depend on the chosen voice. The Apple voices Anna works between 90 and 720 and Andreas Infovox iVox HQ works between 1 and 620.
** Under Windows10 you can set the speed, but not with the following script, because the command line 'wait while revIsSpeaking() is true' has no effect. **

example:
> revSetSpeechSpeed field "fGeschwindigkeit"

The speed can be measured with the following script:
> put (the ticks) div 1 into tZahl1
> revSpeak field "fText"
> wait while revIsSpeaking() is true
> put (the ticks) div 1 into tZahl2
> put tZahl2 - tZahl1 into msg

### revSetSpeechPitch
Sets the pitch for the speech output. According to documentation, the pitch can be a number between 30 and 127. The Apple voices Anna works between 1 and 300 and Andreas Infovox iVox HQ cannot be changed by the numbers. ** Under Windows 10, a number higher than 127 is required to output a high voice, e.g. 300. **

example:
> revSetSpeechPitch field "fTonhöhe"

### revSetSpeechVolume
Sets the pitch for the speech output. According to documentation, the volume is a number between 0 and 100, the Apple voices Anna works between 7 and 100 (0 - 6 is normally loud). The voice Andreas Infovox iVox HQ works between 0 and 100. Even under Windows for Hedda it works as expected.

example:
> revSetSpeechVolume field "fLautstärke"

### Sprachausgabe und Warten bis Text gesagt ist
The revSpeak command starts the voice output.
The wait until revIsSpeaking commands prevents another voice output from aborting the first one. Under Windows10, the 'wait while revIsSpeaking() is true' command line has no effect. So the beep sounded right at the beginning of the voice output instead of at its end.

example:
> revSpeak field "fText"
> wait until revIsSpeaking() is false -- ignored by Windows 10, a big problem!
> beep

### End voice output
The command 'revUnloadSpeech' is used to free up memory. Under Windows 10, this command causes no speech output, since the command line in between does not slow down the sequence of commands and thus the unload is executed almost immediately.

## Thanks
Thanks for reading my little report. I tested it with LiveCode 9.0.0 and RC1 under MacOS X 10.13.6 German, Windows 10 Home Version 1803 in Parallels 13 Pro, Windows 10 Pro Version 1803 in VMWare 10.2 and on real PC with Windows 10 Version 1803. All Windows are fresh installed Versions.

Re: LiveCode 9 and revSpeak (Mac 10.13, Win 10) Problems

Posted: Tue Aug 07, 2018 6:43 pm
by bogs
Interesting. I don't use the speech or sound features myself ('nix user), but the report is very well done.

Re: LiveCode 9 and revSpeak (Mac 10.13, Win 10) Problems

Posted: Tue Aug 07, 2018 6:50 pm
by Klaus
And the very best place for this is:
https://quality.livecode.com

Re: LiveCode 9 and revSpeak (Mac 10.13, Win 10) Problems

Posted: Wed Aug 08, 2018 7:26 pm
by Entdecker
Hi Klaus,
thanks for the link. I put three bug reports in there.

I would like to have revSpeech in iOS and Android as well.

Greetings, Jens.

Re: LiveCode 9 and revSpeak (Mac 10.13, Win 10) Problems

Posted: Thu Aug 09, 2018 7:29 pm
by quailcreek
Jens,
It would be helpful if you posted links to your bug reports here. That way others can track their progress too.

Re: LiveCode 9 and revSpeak (Mac 10.13, Win 10) Problems

Posted: Sat Aug 11, 2018 8:37 am
by Entdecker
Hello Tom,
here are the links to my three bug reports:

reSpeechVoices https://quality.livecode.com/show_bug.cgi?id=21470

Under Windows10 the command line 'wait while revIsSpeaking() is true' has no effect https://quality.livecode.com/show_bug.cgi?id=21471

revSetSpeechSpeed, revSetSpeechPitch, revSetSpeechVolume have wrong parameters in the documention https://quality.livecode.com/show_bug.cgi?id=21472

best regards, Jens.