B4X:
Sub Process_Globals
Public App As Application
Public NavControl As NavigationController
Private Page1 As Page
Private Button1 As Button
Dim TTS1 As TTS
Dim List1 As List
End Sub
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.LoadLayout("t1")
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
TTS1.Initialize("ttsEv")
TTS1.Pitch = 0.5
TTS1.SpeechRate = 0.5
End Sub
Sub Button1_Click
List1.Initialize
List1 = TTS1.GetSupportedLanguages
For j = 0 To List1.Size - 1
If List1.Get(j) = "en-GB" Then
If TTS1.SetLanguage(List1.Get(j)) Then
TTS1.Speak("hi", True)
Exit
End If
Exit
End If
Next
End Sub
Sub ttsEv_Complete (Text As String)
Log("Text : " & Text)
End Sub
Complete event was fired and the log write 'Text : hi' but the text was not specheed.
What i'm wrong ?
or There's something i have to enable on the phone ?
Last edited: