How to Change the Text-to-Speech Voice in Excel VBA
Question details
The user wants to change the Text-to-Speech (TTS) voice in Excel VBA and install a specific voice (such as a male Italian voice) that is currently unavailable.
- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Customizing the audio output of Excel macros by changing the default Text-to-Speech voice.
- Observed behavior
- The desired Text-to-Speech voice is missing from the default options available to Excel VBA.
Ensure your computer is connected to the internet, as downloading new Text-to-Speech voices through your operating system requires an active connection.
Install and Change the Voice via Operating System Settings
Excel VBA relies on the Text-to-Speech engines installed on your operating system. You must add the desired voice in your system settings before it becomes available in Excel.
Excel VBA does not have its own independent library of voices. Instead, it utilizes the Windows Speech API (SAPI). To use a new voice, such as a male Italian voice, you must first download and install the corresponding language pack through your Windows settings.
Press the Windows key + I on your keyboard to open Windows Settings, then navigate to the 'Time & Language' menu.
Click on 'Speech' from the sidebar menu to view your current Text-to-Speech settings and manage installed voices.
Scroll down to the 'Manage voices' section and click the 'Add voices' button. Search for your desired language (e.g., Italian), select it, and click 'Add' to download the voice package.
Once downloaded and installed, the new voice will be available to the Windows Speech API. You can now restart Excel and reference this new voice in your VBA code using the SAPI.SpVoice object.

Try WPS Office for Your Spreadsheet and Macro Needs
If you are experiencing complex configuration issues with Excel's VBA and Text-to-Speech dependencies, consider trying WPS Office. It is a powerful, free, and lightweight suite that provides excellent compatibility with Microsoft Excel formats while offering a highly familiar user interface.

Frequently Asked Questions
Why can't Excel VBA find the voice I just downloaded?
If you recently installed a new voice through Windows Settings, you must completely close and restart Excel. The VBA environment needs to reload the system's Speech API to recognize the newly added Text-to-Speech engines.
How do I write VBA code to select a specific downloaded voice?
You need to utilize the 'SAPI.SpVoice' object in your VBA script. By looping through the 'GetVoices' collection, you can inspect the description of each installed voice and set it as the active voice when the name matches your desired language.
Does the voice gender matter for Text-to-Speech functionality?
It only matters for your audio output preference. When you download a language pack, the operating system often provides both male and female voice variants. You can programmatically specify which one to use in your VBA script by checking the voice's gender attribute.




