A Windows desktop application written in C# for converting text to speech. It allows users to load text from a file or type directly, select a voice, choose an output folder, and then generate MP3 audio files for each line of text.
This application uses PiperSharp which is a C# wrapper for the Piper TTS engine, providing high-quality local text-to-speech capabilities.
- Load text from
.txt
files. - Edit text directly in the application.
- Select an output folder for generated MP3s.
- Voice selection (currently loads one default English voice).
- Converts each line of text into a separate MP3 file.
- Sanitizes filenames generated from text lines.
- Runs locally on Windows.
- Requires .NET 8 Desktop Runtime.
On the first run, the application will automatically download:
- The Piper TTS executable (~25MB).
- A default English voice model (~50-100MB depending on the voice).
These files are stored in %LocalAppData%\TextToSpeechApp\piper_tts
. An internet connection is required for this initial download. Subsequent runs will use the downloaded files.
This project is designed to be built with Visual Studio Community (or any version that supports .NET 8 WinForms development) or using the .NET CLI.
- .NET 8 SDK (with Desktop Development workload)
- (Optional) Visual Studio 2022 or later
- Clone this repository or download the source code.
- Open a command prompt or terminal in the root directory of the project (where
TextToSpeechApp.sln
is located). - Navigate to the project directory:
cd TextToSpeechApp
- Run the build command:
dotnet build -c Release
- The executable will be found in
TextToSpeechApp\bin\Release\net8.0-windows\TextToSpeechApp.exe
.
- Clone this repository or download the source code.
- Open
TextToSpeechApp.sln
in Visual Studio. - Set the build configuration to "Release".
- Build the solution (Build > Build Solution).
- The executable will be found in
TextToSpeechApp\bin\Release\net8.0-windows\TextToSpeechApp.exe
.
- Ensure you have the .NET 8 Desktop Runtime installed if you haven't built from source on the target machine.
- Run
TextToSpeechApp.exe
from the build output directory. - On first launch, allow time for the TTS engine and voice model to download (monitor the status bar).
- Select a text file or type/paste text into the editor.
- Choose an output folder.
- Click "Convert to Speech".