Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Twilio
Message
De
22/03/2016 15:53:45
 
 
À
22/03/2016 14:39:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Twilio
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01633460
Message ID:
01633536
Vues:
60
I never play with twilio but i know sapi_SPVoice (text to speech).
for fun try this code
* load SAPI Engine
loVoiceEngine = CREATEOBJECT("SAPI.SpVoice")
if !vartype(loVoiceEngine)="O"
messagebox("Sapi.SpVoice not installed...cancelling",16+4096)
return .f.
endi

* speak a text
text to m.myvar noshow
this is a testof text to speech with sapi.SPVoice activex control 
under microsoft visual foxpro.
can speech any text or play any wav music file.
you can choose another speaker voice and set a language as english,french...
endtext
loVoiceEngine.speak(m.myvar)

* list installed voices
local m.lnindex,m.xx
m.xx=""
m.lnIndex = 0
FOR EACH loVoice IN loVoiceEngine.GetVoices
lcDescription = loVoice.GetDescription()
m.xx=m.xx+ lcDescription +"  "+trans(m.lnIndex)+chr(13)
lnIndex = lnIndex + 1
ENDFOR
messagebox(m.xx,0+32+4096,'',2000)

* change voice voice 
loVoiceEngine.voice = loVoiceEngine.getvoices().item(1)
loVoiceEngine.speak(m.myvar)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform