There are some reasons why I cannot use the build-in TTS engine. So, I was looking for a Google Service doing this and found this URL:
https://translate.google.com/translate_tts?ie=UTF-8&tl=de-TR&client=tw-ob&q=Guten Morgen
If I put this line into my browser I can hear "Good Morning" in German Language. Nice!!!
So I tried to run the code next, but I neither know how to play this locally on my smartphone nor to create a mp3 file, which I could use to play it.
"j.Sucess" gets never True!
I receive HTML code telling me that access to this page is not given.
Any Idea how this could be done??
https://translate.google.com/translate_tts?ie=UTF-8&tl=de-TR&client=tw-ob&q=Guten Morgen
If I put this line into my browser I can hear "Good Morning" in German Language. Nice!!!
So I tried to run the code next, but I neither know how to play this locally on my smartphone nor to create a mp3 file, which I could use to play it.
HTTP MP3:
Public Sub oTTS
Dim poststr As String
Dim job As HttpJob
Dim res As String
job.Initialize("",Me)
poststr = "https://translate.google.com/translate_tts?ie=UTF-8&tl=de-TR&client=tw-ob&q=Guten Morgen"
job.PostString(poststr, "")
job.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0")
'job.GetRequest.SetHeader("Content-Type", "application/json")
'job.GetRequest.SetContentType("application/json")
'job.GetRequest.SetContentEncoding("text/plain")
Wait For (job) JobDone(j As HttpJob)
If j.Success Then
res = job.GetString
End If
End Sub
"j.Sucess" gets never True!
I receive HTML code telling me that access to this page is not given.
Any Idea how this could be done??
Last edited: