FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
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
Connectez-vous…
adrianoboller
#1
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 20 novembre 2014 - 21:48
-----
IOS
(
)
#import
<
AVFoundation
/
AVFoundation.h
>
void IOS
(
)
{
}
-----
void IOS_LerTexto
(
NSString
*
const
s
Msg
)
{
AVSpeechUtterance
*
utterance
= [
AVSpeechUtterance speechUtteranceWithString
:
s
Msg
]
;
AVSpeechSynthesizer
*
synth
= [
[
AVSpeechSynthesizer alloc
]
init
]
;
[
synth speakUtterance
:
utterance
]
;
}
Signaler
0
0
adrianoboller
#2
Membre enregistré
3 651 messages
Popularité : +175 (223 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
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte