Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hcooper/snips-tts-polly
Use the AWS Polly text-to-speech service with Snip voice platform
https://github.com/hcooper/snips-tts-polly
Last synced: 2 months ago
JSON representation
Use the AWS Polly text-to-speech service with Snip voice platform
- Host: GitHub
- URL: https://github.com/hcooper/snips-tts-polly
- Owner: hcooper
- License: mit
- Archived: true
- Created: 2018-06-14T05:42:24.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T07:53:05.000Z (about 5 years ago)
- Last Synced: 2024-02-14T13:30:41.635Z (12 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 8
- Watchers: 6
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-snips - Amazon Polly TTS - tts`. (Customisations / Informational)
README
***In light of Snips being acquired, and its public services being shutdown, this plugin is no longer maintained. See https://www.home-assistant.io/blog/2019/12/03/sonos-shutting-down-local-voice-option-snips/ for more information.***
# snips-tts-polly
This is a replacement for `snips-tts` (the text-to-speech component of the Snips voice assistant).
Rather than using the local (but low quality) TTS service (e.g. `pico2wav`), this system uses the
much higher quality AWS Polly service.It communicates with Snips via the same MQTT topics as the default TTS service, i.e.
- subscribes to `hermes/tts/say` to pick up new TTS requests.
- sends converted audio to `hermes/audioServer/default/playBytes`.
- closes Snips session via `hermes/tts/sayFinished`.One of the main design features of Snips is that it's a local, rather than cloud based, voice assistant.
Therefore depending on an cloud TTS service may seem to negate those benefits. However the quality
improvement is massive, privacy concern low (i.e. Polly doesn't "listen" to you, or have access to your device), and it's fast.Switching between the two can be as simple as:
`systemctl stop snips-tts-poly && systemctl start snips-tts`
## Dependencies
- `boto3` - python library for communicating with AWS.
- `paho` - python library for interacting with Snips via MQTT.
- `toml` - python library for reading the central Snips config file.
- `mpg123` - binary for converting the MP3s Polly responds with, into WAVs which Snips can process.## Random Comments
- The service caches speech in `/tmp/tts` to avoid converting text it's converted before. It doesn't currently prune this cache, so keep an eye on it.
- I've included an example systemd unit file (`snips-tts-polly.service`) to make it easy to daemonize the service. (Remember to copy the binary to `/usr/bin`).## Credits
Initially developed from [jarvis_listener.py](https://github.com/tschmidty69/homeassistant-config/blob/master/shell_command/jarvis_listener.py) by @tschmidty69