Jump to content

At&t's TTS. Super easy and fast


ConsultingJoe
 Share

Recommended Posts

BTW: there are way more voices but I didnt feel like getting all of them. This would be a great UDF

#include <IE.au3>
;http://www.research.att.com/~ttsweb/tts/demo.php
$data_voice = "mike"; Or crystal
$data_txt = InputBox( "TTS", "Enter Text", "hello there" )
$ie = _IECreate( "http://www.research.att.com/~ttsweb/tts/demo.php", 0, 0 )
$form = _IEFormGetObjByName( $ie, "demoForm" )
$voice = _IEFormElementGetObjByName( $form, "voice" )
_IEFormElementSetValue( $voice, $data_voice )
$txt = _IEFormElementGetObjByName( $form, "txt" )
_IEFormElementSetValue( $txt, $data_txt )
$submit = _IEFormElementGetObjByName( $form, "downloadButton" )
$submit.click
_IELoadWait( $ie )
$read = _IEBodyReadText( $ie )
_IEQuit( $ie )
$start = "Your audio can be found at "
$end = "To download, right-click the link above."
$url = extractString( $read, $start, $end )
$url = "http://192.20.225.55" & $url
ConsoleWrite( $url )
InetGet( $url, @TempDir & "\tts.wav", 1 )
SoundPlay( @TempDir & "\tts.wav", 1 )
Func extractString($string, $startString, $endString)
    ;this function returns the contents of a string between two substrings
    $startStringPos = StringInStr($string, $startString)
    $endStringPos = StringInStr($string, $endString)
    $startPos = $startStringPos + StringLen($startString) - 1
    $endPos = $endStringPos - 1
    $extractedString = StringLeft($string, $endPos)
    $extractedString = StringTrimLeft($extractedString, $startPos)
    Return $extractedString
EndFunc   ;==>extractString
Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

OOOOOOOOOOooooo. Extremely nice voice. Great TTS engine.

Thanks goto, the site to see the other voices.

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Have been and returned. However, I can't help but imagine there is an easier way to do this.

I tried to do TCP but it didnt respond right. yet this is still fast, simple, and sweet.

Good Night

Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Just so you know, it looks like you have to send a "POST" request to this server. I was trying to do this with TCP functions, but am at a standstill at the moment. If you would like to see how this can be done, search for "Content-Length" on these forums. I hit paydirt with that search term on POSTing to sites.

Who else would I be?
Link to comment
Share on other sites

Just so you know, it looks like you have to send a "POST" request to this server. I was trying to do this with TCP functions, but am at a standstill at the moment. If you would like to see how this can be done, search for "Content-Length" on these forums. I hit paydirt with that search term on POSTing to sites.

I was using the HTTP.au3 to post and it just returned "<T" for some reason

Maybe it is blocking the referer

Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Good script. The voices are very realistic

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
Link to comment
Share on other sites

Just tried it out and must say (as others have said) the voices are highly realistic. I wonder if there a way to implement a TTS engine as realistic as this one into a script locally without having to connect to the net.

Edited by SolidSnake
HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Link to comment
Share on other sites

GUI

#include <IE.au3>
;http://www.research.att.com/~ttsweb/tts/demo.php
#include <GUIConstants.au3>
$voices_combo_data = "crystal|mike|rich|lauren|claire|rosa|alberto|klara|reiner|alain|juliette|arnaud|charles|audrey|anjali"
$voices_combo_text = "Crystal ... US English,Mike ...... US English,Rich ...... US English,Lauren .... US English,Claire .... US English,Rosa ...... Latin Am. Spanish,"
$voices_combo_text &= "Alberto ... Latin Am. Spanish,Klara ..... German,Reiner .... German,Alain ..... French,Juliette .. French,Arnaud .... CA French,"
$voices_combo_text &= "Charles ... UK English,Audrey .... UK English,Anjali .... IN English"
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("At&t TTS", 202, 191, 193, 115)
$Combo1 = GUICtrlCreateCombo("crystal", 8, 128, 185, 25)
GUICtrlSetData( -1, $voices_combo_data )
$Edit1 = GUICtrlCreateEdit("", 8, 8, 185, 113)
GUICtrlSetData(-1, "Text to speak")
$Button1 = GUICtrlCreateButton("Speak", 8, 152, 89, 33, 0)
$Button2 = GUICtrlCreateButton("Save", 104, 152, 89, 33, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button2
            ProgressOn( "Loading", "Please wait" )
            $file = FileSaveDialog( "At&t TTS", @ScriptDir, "Wave (*.wav)", 2, "tts.wav" )
            If @error Then
                ContinueLoop
                ProgressOff()
            EndIf
            speak(guictrlread( $Edit1 ), GUICtrlRead( $Combo1 ))
            FileCopy( @TempDir & "\tts.wav", $file )
            ProgressOff()
        Case $Button1
            ProgressOn( "Loading", "Please wait" )
            speak(guictrlread( $Edit1 ), GUICtrlRead( $Combo1 ))
            ProgressOff()
            SoundPlay( @TempDir & "\tts.wav", 1 )
    EndSwitch
WEnd

Func speak($data_txt, $data_voice = "mike")
$ie = _IECreate( "http://www.research.att.com/~ttsweb/tts/demo.php", 0, 0 )
$form = _IEFormGetObjByName( $ie, "demoForm" )
$voice = _IEFormElementGetObjByName( $form, "voice" )
_IEFormElementSetValue( $voice, $data_voice )
$txt = _IEFormElementGetObjByName( $form, "txt" )
_IEFormElementSetValue( $txt, $data_txt )
$submit = _IEFormElementGetObjByName( $form, "downloadButton" )
$submit.click
_IELoadWait( $ie )
$read = _IEBodyReadText( $ie )
_IEQuit( $ie )
$start = "Your audio can be found at "
$end = "To download, right-click the link above."
$url = extractString( $read, $start, $end )
$url = "http://192.20.225.55" & $url
ConsoleWrite( $url )
FileDelete( @TempDir & "\tts.wav" )
Sleep(1000)
InetGet( $url, @TempDir & "\tts.wav", 1 )
Return 1
EndFunc

Func extractString($string, $startString, $endString)
    ;this function returns the contents of a string between two substrings
    $startStringPos = StringInStr($string, $startString)
    $endStringPos = StringInStr($string, $endString)
    $startPos = $startStringPos + StringLen($startString) - 1
    $endPos = $endStringPos - 1
    $extractedString = StringLeft($string, $endPos)
    $extractedString = StringTrimLeft($extractedString, $startPos)
    Return $extractedString
EndFunc   ;==>extractString
Edited by zerocool60544

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Can you download these voices to the narrator? I noticed it has the option to select something other than microsoft sam, but i cant find how to upload more to it

Not that i cant read or anything :whistle: its fun

I like the GUI version to ;)

Link to comment
Share on other sites

Can you download these voices to the narrator? I noticed it has the option to select something other than microsoft sam, but i cant find how to upload more to it

Not that i cant read or anything :whistle: its fun

I like the GUI version to ;)

Thanks but this is a demo of at&t. they want some money for there services. I think they dont offer these voices. Microsoft has Mike, Mary, and a few others. try googling them

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

  • 2 weeks later...

You could get this via textaloudmp3 and the plugin pack for about $55 (with US Mike and Mary, it's extra for more voices)if you really want them (this seems like a good inventment to me).

or I could do it this way and not have to pay $55

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

or I could do it this way and not have to pay $55

Yea, but this way it only reads 300 characters to you, rather than an entire document. 300 characters isn't even a medium length forum post.

Now, if this would somehow split every 300 characters and submit them in sequence such that it would read an entire pasted post or text file, that would be useful. Especially if that then could output an MP3 file for on the go.

Link to comment
Share on other sites

Yea, but this way it only reads 300 characters to you, rather than an entire document. 300 characters isn't even a medium length forum post.

Now, if this would somehow split every 300 characters and submit them in sequence such that it would read an entire pasted post or text file, that would be useful. Especially if that then could output an MP3 file for on the go.

I could do that but it would output 3 mp3s if it was 900 characters unless there is a way to amend them together.

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...