PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 24 → Speech Synthesis Text in iOS and Android Example
Speech Synthesis Text in iOS and Android Example
Débuté par adrianoboller, 20 nov. 2014 21:48 - 1 réponse
Membre enregistré
3 010 messages
Popularité : +89 (91 votes)
Posté le 20 novembre 2014 - 21:48
-----
IOS()
#import <AVFoundation/AVFoundation.h>

void IOS(){}


-----

void IOS_LerTexto(NSString *const sMsg)
{
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:sMsg];
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init];
[synth speakUtterance:utterance];
}
Membre enregistré
3 010 messages
Popularité : +89 (91 votes)
Posté le 20 novembre 2014 - 21:49
Procedure Android_LerTexto(LOCAL Texto, LOCAL VibrarSN, LOCAL TooltipSN, LOCAL ComSemSom)

//CODE ANDROID - Use Target Code

ok is boolean = False

IF Texto <> "" AND Length(Texto) AND ComSemSom = "ComSom" THEN

IF InAndroidMode() = True THEN

ok = SpeechSynthesisInitialize(NationToLanguage(nationBrazilianPortuguese))

IF ok = True THEN

IF VibrarSN = "S"
VibrationTrigger(3000)
END

SpeechSynthesisReadText(Texto,True)

IF TooltipSN = "S"
Popup(Texto,"L")
END

IF VibrarSN = "S" THEN
VibrationTrigger(3000)
VibrationStop()
END

END

ELSE

IF TooltipSN = "S" THEN
Popup(Texto,"L")
ELSE
NextTitle("Atenção:")
Info(Texto)
END

IF VibrarSN = "S"
VibrationStop()
END

END


END

//CODE ANDROID