A lightweight C++ application for Windows that turns any text you type into speech, routed through a virtual microphone so you can "speak" into voice calls, games, or streams just by typing.
The app uses VB-Audio Virtual Cable to create a virtual microphone device. When you type text into the console and hit Enter, the app converts it to speech and plays it through that virtual mic, so any application listening for microphone input (Discord, Zoom, games, etc.) hears it as if you spoke.
- Language: C++
- Text-to-Speech: Microsoft Speech API (SAPI) - converts typed text into synthesized speech.
- COM libraries:
ole32.lib,oleaut32.lib- required to initialize and interact with SAPI's COM-based interfaces. - Audio routing: VB-Audio Virtual Cable - SAPI plays audio through the default output device, so setting your default playback device to the VB-Cable input routes the speech into the virtual microphone.
Linked libraries:
#pragma comment(lib, "sapi.lib")
#pragma comment(lib, "ole32.lib")
#pragma comment(lib, "oleaut32.lib")- Windows OS
- VB-Audio Virtual Cable installed and configured
- A C++ compiler / build tools (e.g. Visual Studio) to build from source
- Clone or download this repository.
- Install VB-Audio Virtual Cable if you haven't already.
- Compile the project.
- Build in Debug mode if you run into issues - it provides extra diagnostic output.
- Launch the application - a console window will appear.
- In your target app (Discord, Zoom, a game, etc.), set your microphone/input device to the VB-Audio virtual cable created by the installer.
- In the console window, type the text you want spoken and press Enter.
- The app converts your text to speech and plays it through the virtual microphone.
- Type 'exit' to close out of the program.
- No audio output / other apps can't hear it: Double-check that your target application's input device is set to the VB-Audio virtual cable, not your physical mic. Also confirm your Windows default playback device is set to VB-Cable.
- Does not work: Recompile the source in debug mode and look for errors in the console.
- The voice can have issues with pronouncing words.
- The voice does not sound the best.
- Instead of SAPI use something like ElevenLabs for the voice it should pronounce things better and sound less robotic.