Skip to main content

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

Project description

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

  • Use a string library to analyze and filter the text before converting.
  • 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.

Links

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

Version

0.3.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

willspeak-0.3.2.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

willspeak-0.3.2-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file willspeak-0.3.2.tar.gz.

File metadata

  • Download URL: willspeak-0.3.2.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for willspeak-0.3.2.tar.gz
Algorithm Hash digest
SHA256 d49f97fdc4095c8f9c9215ea3c3749045f766b62c40ae8b960837b5d96e08ee0
MD5 4db3f0c05d74ffb47c88b027db74ad5b
BLAKE2b-256 f124bec9b20319e48d2781e58baabac71d9ed58b2e3df10b65552acff47cb134

See more details on using hashes here.

File details

Details for the file willspeak-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: willspeak-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for willspeak-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9535cd1928e0f320e50ed5123819cc5284f2bd9eb317005a0f1b659ccc6dd9f2
MD5 60622aba2d9db3adc06c9716c9f266cb
BLAKE2b-256 eb929d80cb73fe62afc525d38f300b42608ff5332fde99b49c8950c6b4251a93

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page