Jump to content



Photo

At&t's TTS. Super easy and fast


  • Please log in to reply
16 replies to this topic

#1 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 22 October 2006 - 07:13 AM

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

AutoIt         
#include <IE.au3> ;<a href='http://www.research.att.com/~ttsweb/tts/demo.php' class='bbc_url' title='External link' rel='nofollow external'>http://www.research.att.com/~ttsweb/tts/demo.php</a> $data_voice = "mike"; Or crystal $data_txt = InputBox( "TTS", "Enter Text", "hello there" ) $ie = _IECreate( "<a href='http://www.research.att.com/~ttsweb/tts/demo.php' class='bbc_url' title='External link' rel='nofollow external'>http://www.research.att.com/~ttsweb/tts/demo.php"</a>, 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 = "<a href='http://192.20.225.55' class='bbc_url' title='External link' rel='nofollow external'>http://192.20.225.55"</a> & $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, 22 October 2006 - 07:13 AM.








#2 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,372 posts

Posted 22 October 2006 - 07:20 AM

OOOOOOOOOOooooo. Extremely nice voice. Great TTS engine.
Who else would I be?

#3 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 22 October 2006 - 07:22 AM

OOOOOOOOOOooooo. Extremely nice voice. Great TTS engine.

Thanks goto, the site to see the other voices.

#4 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,372 posts

Posted 22 October 2006 - 07:23 AM

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

#5 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 22 October 2006 - 07:31 AM

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, 22 October 2006 - 07:32 AM.


#6 this-is-me

this-is-me

    Pursuer of obscure functionality

  • Active Members
  • PipPipPipPipPipPip
  • 2,372 posts

Posted 22 October 2006 - 07:45 AM

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?

#7 NELyon

NELyon

    Do you wanna brew my avatar?

  • Active Members
  • PipPipPipPipPipPip
  • 3,526 posts

Posted 22 October 2006 - 02:15 PM

Much more realistic than SAPI's voices!

This is cool :whistle:

#8 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 22 October 2006 - 05:32 PM

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, 22 October 2006 - 05:32 PM.


#9 RazerM

RazerM

    cowinkeedenky - coincidence?

  • Active Members
  • PipPipPipPipPipPip
  • 1,246 posts

Posted 22 October 2006 - 06:22 PM

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.

#10 FuryCell

FuryCell

    A cornered fox is more dangerous than a jackal!

  • Active Members
  • PipPipPipPipPipPip
  • 2,437 posts

Posted 22 October 2006 - 09:00 PM

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, 22 October 2006 - 09:00 PM.

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

#11 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 22 October 2006 - 10:59 PM

GUI

AutoIt         
#include <IE.au3> ;<a href='http://www.research.att.com/~ttsweb/tts/demo.php' class='bbc_url' title='External link' rel='nofollow external'>http://www.research.att.com/~ttsweb/tts/demo.php</a> #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( "<a href='http://www.research.att.com/~ttsweb/tts/demo.php' class='bbc_url' title='External link' rel='nofollow external'>http://www.research.att.com/~ttsweb/tts/demo.php"</a>, 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 = "<a href='http://192.20.225.55' class='bbc_url' title='External link' rel='nofollow external'>http://192.20.225.55"</a> & $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, 22 October 2006 - 10:59 PM.


#12 Rad

Rad

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 412 posts

Posted 22 October 2006 - 11:04 PM

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 ;)

#13 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 22 October 2006 - 11:51 PM

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

#14 jp10558

jp10558

    Adventurer

  • Active Members
  • PipPip
  • 110 posts

Posted 31 October 2006 - 04:21 PM

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).

#15 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 31 October 2006 - 08:31 PM

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

#16 jp10558

jp10558

    Adventurer

  • Active Members
  • PipPip
  • 110 posts

Posted 01 November 2006 - 01:58 PM

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.

#17 ConsultingJoe

ConsultingJoe

    ConsultingJoe.com

  • Active Members
  • PipPipPipPipPipPip
  • 1,667 posts

Posted 01 November 2006 - 03:13 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users