PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
Speech Synthesis Text in iOS and Android Example
Speech Synthesis Text in iOS and Android Example
Started by adrianoboller, Nov., 20 2014 9:48 PM - 1 reply
Connect yourself…
adrianoboller
#1
Registered member
3,662 messages
Popularité : +175 (223 votes)
Posted on November, 20 2014 - 9:48 PM
-----
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
]
;
}
Report
0
0
adrianoboller
#2
Registered member
3,662 messages
Popularité : +175 (223 votes)
Posted on November, 20 2014 - 9:49 PM
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
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text