How to get speak link from Google TTS

Dossfm0q

Banned User
Joined
Mar 9, 2009
Messages
570
Office Version
  1. 2019
Platform
  1. Windows
Greetings
how to get the when you copy it will speak? pleas see Picture
after click listen Button Right Mouse then inspect element >> network >> Media

VBA Code:
Public Sub Get_TTS()

Dim IE As Object
   Dim Url As String
    Set IE = CreateObject("InternetExplorer.Application")
   
    Url = "https://translate.google.com.sa/?hl=ar&tab=wT1#view=home&op=translate&sl=en&tl=ar&text=dog"
    With IE
        .navigate Url
        While .busy Or .readystate < 4: DoEvents: Wend
        .document.queryselector(".ttsbutton").Click ' or
        '.document.queryselector(".src-tts").Click' all of them work will
        ' her I need to type Code that copy TTS Url Pleas see attch Picture
        Application.Wait Now + TimeValue("00:00:05")
        .Quit
   
    End With

End Sub

Thank
 

Attachments

  • Get TTS Url.PNG
    Get TTS Url.PNG
    69.3 KB · Views: 13

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Network without Media help PLZ
VBA Code:
Public Sub Google_TTS()

    Dim IE As InternetExplorer
    Set IE = CreateObject("InternetExplorer.application")
    IELang = "hl=" & "en"
    TrnsFrom = "sl=" & "en"
    TrnsTo = "tl=" & "ar"
    TXT = "My Car" ' orActiveCell
    StrUrl = "https://translate.google.com/?" & IELang & "&tab=wT1&authuser=0#view=home&op=translate&" & TrnsFrom & "&" & TrnsTo & "&text=" & TXT
    With IE
    .Visible = True
    .Navigate StrUrl
        While .busy Or .ReadyState < 4: DoEvents: Wend
       ' .Document.queryselector(".ttsbutton").Click ' or
        
        SendKeys String:="{F12}" ' call  Inspect Elements<<<<<<
        SendKeys String:="^4" ' call  Inspect Elements Network<<<<<<
        Application.Wait Now + TimeValue("00:00:02")
        .Document.queryselector(".src-tts").Click ' all of them work will
        ' her I need to type Code that copy TTS Url Pleas see attch Picture
       ' Application.Wait Now + TimeValue("00:00:01")
       ' .Quit
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,883
Messages
6,181,551
Members
453,052
Latest member
ezzat

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top