Results 1 to 6 of 6

Thread: Translator with Sound/Speech

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Translator with Sound/Speech

    Here is a little word translation sample i would like people to have.. if you have any questions feel free to ask. you can also download the sounds/speech, ask me how if you need and i will show you how

    i only used textbox and mine does not display (chinese,arabic...) languages its shows up as ?????... if you need other languages i would recommend switch to other types of control that will support other languages such as "Microsoft Forms 2.0 Object Library" (or other controls)

    Speech translation will work however, even if it does not display correctly in textbox

    anyways here is a working translator with sound


    ***Additional*** Example of how to get speech/sound status
    Code:
    Private Sub Command1_Click()
    WindowsMediaPlayer1.URL = "http://translate.google.com/translate_tts?ie=UTF-8&tl=" & GetLanguage(cmbTo) & "&q=" & ieGoogle.document.getElementById("result_box").innertext
    ChangeStatus "Loading Speech/Audio...."
    Do Until WindowsMediaPlayer1.playState = wmppsPlaying
      DoEvents
    Loop
    ChangeStatus "Playing Speech/Audio..."
    Do Until WindowsMediaPlayer1.playState = wmppsStopped
      DoEvents
    Loop
    ChangeStatus "Ready"
    End Sub
    
    Private Sub Command2_Click()
    WindowsMediaPlayer1.URL = "http://translate.google.com/translate_tts?ie=UTF-8&tl=" & GetLanguage(cmbFrom) & "&q=" & txtTranslate.Text
    ChangeStatus "Loading Speech/Audio...."
    Do Until WindowsMediaPlayer1.playState = wmppsPlaying
      DoEvents
    Loop
    ChangeStatus "Playing Speech/Audio..."
    Do Until WindowsMediaPlayer1.playState = wmppsStopped
      DoEvents
    Loop
    ChangeStatus "Ready"
    End Sub
    
    Private Sub cmdTranslate_Click()
    On Error Resume Next
      Command1.Enabled = True
      Command2.Enabled = True
      txtResult.Enabled = True
      txtResult.Text = ieGoogle.document.getElementById("result_box").innertext
      
      ChangeStatus "Preparing Speech/Audio...."
      
      WindowsMediaPlayer1.URL = "http://translate.google.com/translate_tts?ie=UTF-8&tl=" & GetLanguage(cmbFrom) & "&q="
      
      Do Until WindowsMediaPlayer1.playState = wmppsReady
        DoEvents
      Loop
      ChangeStatus "Ready"
    End Sub
    ******FOR UNICODE SUPPORT******
    Download free unicode controls - EditControls
    Install
    Replace original txtResult with the new TimoSoft EditControls 1.8 (or earlier version)
    Make sure it is Multiline = True

    here you go with full language support and full sound support!!
    Attached Files Attached Files
    Last edited by Max187Boucher; Oct 12th, 2012 at 07:18 PM.

  2. #2
    New Member
    Join Date
    Oct 2012
    Posts
    4

    Re: Translator with Sound/Speech

    Very interesting i like way you doing it!
    well i would like to ask you about Spanish as Spanish is my favorite language.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Translator with Sound/Speech

    It should display spanish, how can i help you with spanish?

    Thanks

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Translator with Sound/Speech

    i got a free control that has a Unicode Textbox Control!! for anyone who is interested or need Unicode
    you only need to change the textbox "txtResult" with this Edit Controls Textbox

    it will now have full support of ALL languages i tried and it works 100% please have a look it will save you alot of work and it is free nd you can distribute it also
    i did not supply it with my translator because i do not want to add more files to it... instead i gave you the link just download it and install it then you can use free controls that supports Unicode and make my translator support all language have fun!

  5. #5
    Junior Member
    Join Date
    Oct 2012
    Posts
    24

    Re: Translator with Sound/Speech

    Tis is wonderful.
    it does support Arabic as well.
    the reason Arabic letters appear as ????? in some PC's is that they don have Arabic language installed properly.
    it gets both translation and pronunciation.

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Aug 2011
    Location
    B.C., Canada
    Posts
    2,887

    Re: Translator with Sound/Speech

    Thanks for the replies.

    Thanks for letting me know it supports arabic if it installed properly on system.

    For those who does not have arabaic (or other language) not installed try the Unicode EditControl i gave the link to

    Anymore comments/replies or bugs is appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width