Sub Button1_Click
DownloadTTSSpeak("Καλημέρα, τι κάνεις; Όλα καλά;", "el", "KalimeraTiKaneis")
End Sub
Sub DownloadTTSSpeak(TextToSpeak As String, Language As String, FilenameToSaveWithOutExtension As String)
Dim hj As HttpJob
hj.Initialize("", Me)
hj.Download($"https://translate.google.com/translate_tts?ie=UTF-&&client=tw-ob&tl=${Language}&q=${TextToSpeak};"$)
Wait For (hj) JobDone(hj As HttpJob)
If hj.Success Then
File.WriteBytes("C:\Del", $"${FilenameToSaveWithOutExtension}.mp3"$, Bit.InputStreamToBytes(hj.GetInputStream))
xui.MsgboxAsync("Ok World!", "B4X")
Else
xui.MsgboxAsync("Not Ok World!", "B4X")
End If
End Sub