Windows voice
Text-to-speech
1. Region and Language - Windows 10
To verify or change your Windows Text-to-speech voice settings:
- Click the Windows Start button
- Next, Click the Settings item on the Start Menu
- From the Settings dialog box, click the Time and Language item, then select Speech
- On the Speech tab, find the Text-to-speech item
- There is a list of voices, a slider to adjust the speed, and a Preview voice button
- Select the voice: Microsoft Catherine; Microsoft Zira; Microsoft Mark; or, Microsoft James
- This voice will then be available in Excel with the Application.Speech.Speak method
2. Sample code
Sample code using the Application.Speech.Speak method. Run the VoiceDemo
macro to hear the result.
Code 1: Sub
VoiceDemo
converts a text string to speech
Private Sub xlVoice(inString As String) Application.Speech.Speak inString End Sub Sub VoiceDemo() xlVoice "This is excel at finance dot com" End Sub
Preview the audio from this mp3 media file. Download the mp3 file.
- Download: xlf-voice-demo.xlsm [19 KB ]
- Development platform: Excel 2016 64 bit.
- Revised: Friday 24th of February 2023 - 10:37 PM, Pacific Time (PT)