locked
How to call Dutch voice Frank from VBA RRS feed

  • Question

  • Hi,

    I want to let the Dutch voice "Frank" speak my text "Hello World" from a VBA script in Excel or outlook 2019.

    I am familiar using TTS voices called from VBA code, but 'Frank' is not in the list. It looks like SAPI only recognises the Old-type voices. The only way now is to  select a piece of text by hand and press the play button with my mouse: then it speaks perfectly.  But how from VBA, Any clue? Thanks in advance.


    Sunday, December 13, 2020 5:05 AM

All replies

  • Hi

    Sub TalkToMe()
    Application.Speech.Speak "Excel is talking to me"
    End Sub

    Sub TalkToMe2()
    Application.Speech.Speak "Excel is talking to me"
    MsgBox "test"
    End Sub

    Sub TalkToMe3()
    Application.Speech.Speak "Excel is talking to me", SpeakAsync:=True
    MsgBox "test"
    End Sub

    Sub TalkToMe4()
    Application.Speech.Speak "Excel is talking to me", SpeakAsync:=True
    Application.Wait (Now + TimeValue("00:00:01"))
    Application.Speech.Speak "Interrupting Cow!", SpeakAsync:=True, Purge:=True
    End Sub

    Best Regards.

    Please click the Mark as answer button and vote as helpful if this reply solves your problem.

    Sunday, December 13, 2020 6:26 AM
  • What code, which does not work, are you currently using?

    Sunday, December 13, 2020 11:07 AM
  • Hi

    Press Alt+F11 into excel sheet

    insert new model past the code and run.

    Best Regards.

    Please click the Mark as answer button and vote as helpful if this reply solves your problem.

    Sunday, December 13, 2020 8:48 PM
  • Hi Hakkim and others,
    From Outlook: When I run your code, I get the TTS Zira voice, speaking in English. There is only one TTS voice on the system is says:
    Sub AvailableVoices()
            Dim i           As Long
            Dim voc         As Object
            Set voc = CreateObject("SAPI.SpVoice")
            Debug.Print voc.GetVoices.Count & " available voices:"
            For i = 0 To voc.GetVoices.Count - 1
                Set voc.Voice = voc.GetVoices.Item(i)
                Debug.Print " " & i & " - " & voc.Voice.GetDescription
                voc.Speak "test audio"
            Next i
        End Sub
    ==Result================================= 
    1 available voices:
     0 - Microsoft Zira Desktop - English (United States)


    ========================================
    But when I start the 'on screen' voice, by selecting a piece of tekst and press the play button the Voice 'Frank' appears, speaking in Dutch!! This is the one I would like to start from VBA Code, not by mouse click:
    At this point only voice Frank is shown: As Microsoft states, the only available voice:
    So again, how can I use the voice Frank to speak, from my VBA Code.


    Thanks in advance for your answers.
    Monday, December 14, 2020 2:19 AM
  • What is the meaning of this printscreen?  I told you that The voice in Outlook is speaking Dutch using the voice 'Frank' That is working wel, the settings are OK sofar.

    I keep repeating myself: My question is again, how can I use the voice 'Frank' to speak, from my VBA Code? Any clue?

    Monday, December 14, 2020 11:38 PM
  • Did you try a similar loop, but using References instead of CreateObject (https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e6f7dd1b-a64f-4af4-bd43-f6024a4321d3)? You will probably get the same result (missing voice).

    You can also research if VB.NET or C# works better and speaks more voices: https://docs.microsoft.com/en-us/dotnet/api/system.speech.synthesis.speechsynthesizer.getinstalledvoices. These languages can be used in Office too.

    Tuesday, December 15, 2020 7:07 AM
  • Thanks you all for the tips. Finally I found out what it is and now the voices are available in all systems and all sapi versions available. After normal installation Microsoft does not redirect every voice to the available systems.

    I never used VB.NET  or C#, so I spent some time to learn that. VB.NET goes well, C# will take me some more time, but thanks to the web, there are enough samples to learn from. Thanks again.

    Wednesday, December 30, 2020 8:00 PM