Skip to main content

WillSpeak - Work in Progress

Python Text to Speach using Microsoft Sapi5 with a server/client model.

Progress update

The core functionality is now working, and is ready for testing. Some cleanup is still required, but it works. Only supports SAPI5 for now. More to come in the future.

Info

I created this project as a way to have good TTS on linux, because TTS on linux at the moment is dreadful. For a long time I wanted to switch to linux, but I needed a good linux TTS software but could not find one. So I decided to create this project to interface with the windows SAPI5 TTS engine.

How it works is by running this software in server mode on a Windows machine. Then configure the linux client to communicate with that Windows TTS server. The client will monitor for text that was copied to the clipboard and converts the text into speech.

Usage

This software has 2 different operational modes, "Local" & "Server/Client". If the TTS engine that you have selected works natively on your operating system, Then you can use Local mode. e.g. SAPI5 is native to windows, so you can use Local mode on Windows when using SAPI5. You should use Server/Client if you want to use SAPI5 on linux. It requires python 3.10 or grater.

Install using pip

python3 -m pip install willspeak

Run locally on Windows

willspeak local

To run in server mode do.

willspeak server

And on the client machine run. "--addr" is the address of the server running the server component.

# 192.168.1.60 is just an example
willspeak client --addr=192.168.1.60

There is one last command that is used to stop any current speech.

willspeak stop

TODO

  • Setup prometheus metrics to track usage. This is useful if you wish to use a paid for TTS Service.
  • Add support for other text to speech engines, like eSpeak.
  • Add support for running the server component as a Windows service.
  • Change the way things are configured from CLI args to web interface.
  • Document how to enable more SAPI5 voices.
  • See if there is a way to hide the useless stderr output from pyaudio on linux.

Enable Extra SAPI5 Voices

Extra SAPI5 voices can be installed by going to Settings -> Time & Language -> Speech. Click the plus icon next to add voices in the Manage voices section. Here you will see a full list of available voices for a given language. Select language voice you want and click add. This will download and install the new voices. They will be available for preview when you close and re-open the settings app.

You can even use the Cortana voice (Eva) for SAPI5, but this requires a registry tweak to be able to enable it. And also requires you to have the English (US) language pack installed. This is the best female voice in my opinion. But if you are looking for a male voice then Richard is the best, available in the English (Canada) voice package.

Links

https://winaero.com/unlock-extra-voices-windows-10/

Version

0.3.0

Release files for willspeak 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for willspeak 0.4.0
File Size Uploaded
willspeak-0.4.0.tar.gz 25.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for willspeak 0.4.0
File Interpreter ABI Platform
willspeak-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 53.7 kB

Release files / willspeak-0.4.0.tar.gz

Download URL willspeak-0.4.0.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
afe00a333ca25749291ff94c099aa0118e2bb5d84a585c5bf516d53b253b7502
BLAKE2b-256 checksum
How to use checksums
08b48dfa510a436444c1fde2ef84a6ff5ff9a5069f18a706a955f138ab7c753f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release files / willspeak-0.4.0-py3-none-any.whl

Download URL willspeak-0.4.0-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6309756bfd21a6e35480929fd9300a3b653628731c7d8e1c4062ad3e3d74eaa2
BLAKE2b-256 checksum
How to use checksums
d314a2d24225b31bac01600d2aec46141aa4c2e659703173853300e52223a9e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page