https://github.com/nimroddolev/chime_tts
A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages
https://github.com/nimroddolev/chime_tts
hacs hacs-integration home-assistant python
Last synced: about 1 year ago
JSON representation
A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages
- Host: GitHub
- URL: https://github.com/nimroddolev/chime_tts
- Owner: nimroddolev
- License: mit
- Created: 2023-05-29T14:34:59.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T19:27:32.000Z (over 1 year ago)
- Last Synced: 2024-10-29T21:36:43.104Z (over 1 year ago)
- Topics: hacs, hacs-integration, home-assistant, python
- Language: Python
- Homepage: https://nimroddolev.github.io/chime_tts/
- Size: 89.3 MB
- Stars: 190
- Watchers: 3
- Forks: 14
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README

[](https://github.com/hacs/integration)

[![Community Forum][forum-shield]][forum]

Chime TTS is a custom Home Assistant integration that eliminates the audio lag between playing a chime/notification sound effect before a TTS audio notification.
#### If you find Chime TTS useful, consider showing your support: 
- [What is Chime TTS?](https://nimroddolev.github.io/chime_tts/docs/getting-started#what-is-chime-tts)
- [Features](https://nimroddolev.github.io/chime_tts/docs/getting-started#features)
- [Quick Start](https://nimroddolev.github.io/chime_tts/docs/getting-started#quick-start)
- [How Do I Use It?](https://nimroddolev.github.io/chime_tts/docs/getting-started#how-do-i-use-it)
- [Support & Discussion](https://nimroddolev.github.io/chime_tts/docs/getting-started#support-and-discussion)
---
## What is Chime TTS?
Chime TTS is a custom Home Assistant integration that locally combines TTS audio and sound effects into seamless audio for playback in a single action call, eliminating the lag. Chime TTS includes a [suite of options](https://nimroddolev.github.io/chime_tts/docs/getting-started#features) to further customize the audio.
### The Problem:

Adding a notification chime before Text-To-Speech (TTS) audio messages requires two separate action calls, which introduces lag due to networking latency of cloud TTS platforms, audio processing, and delays before media_player playback begins.
### The Solution:

**Chime TTS** addresses this issue by combining the audio files into _a single file_ locally on your Home Assistant device. This combined file is then played through your speakers in one seamless event, eliminating any lag.
***
## Features
Chime TTS offers various features that enhance TTS audio playback experience:
- **No lag or timing issues:** Precise timing between audio files without cloud TTS delays.
- **Customizable audio cues:** Play preset or custom audio before and after TTS messages.
- **Flexible TTS platform selection:** Supports various [TTS platform integrations](https://www.home-assistant.io/integrations/#text-to-speech).
- **Easy action invocation:** Use the [`chime_tts.say`](https://nimroddolev.github.io/chime_tts/docs/documentation/actions/say-action/) and [`chime_tts.say_url`](https://nimroddolev.github.io/chime_tts/docs/documentation/actions/say_url-action/) actions in automations and scripts.
- **Set media player volume:** Notifications can be played at a defined volume and restored after playback.
- **Restore previous audio:** Chime TTS supports pausing and resuming currently playing audio beyond the media player platforms supported by Home Assistant *(eg: HomePods)*.
- **Mix and match TTS platforms:** Combine TTS audio using multiple TTS platforms within the same audio announcement.
- **Configurable TTS speed:** Set the TTS audio speed anywhere from 1-500%.
- **Configurable TTS pitch:** Set the pitch for TTS audio, allowing for more customization.
- **Support for FFmpeg arguments:** Apply FFmpeg jobs to the generated audio, or specific jobs to specific chimes and TTS audio segments.
- **Configurable delay:** Set custom delays between chimes & TTS audio.
- **Configurable overlay:** Set custom overlay durations between chimes & TTS audio.
- **Caching:** Cache audio for faster playback.
- **Speaker Groups:** Group speakers for simultaneous playback *(on supported platforms)*.
***
## Quick Start
Follow these easy steps to get started with Chime TTS:
1. [Installation](https://nimroddolev.github.io/chime_tts/docs/quick-start/installing-chime-tts) - Quickly install Chime TTS via HACS or manually.
2. [Add the Integration](https://nimroddolev.github.io/chime_tts/docs/quick-start/adding-the-integration) - Add Chime TTS to your Home Assistant instance.
***
## How Do I Use It?
### Actions
Chime TTS adds 4 new actions to your Home Assistant instance: `chime_tts.say`, `chime_tts.say_url`, `chime_tts.replay` and `chime_tts.clear_cache`. Discover how you can use these actions and the features they offer:
- [`chime_tts.say`](https://nimroddolev.github.io/chime_tts/docs/documentation/actions/say-action/): Play audio and TTS messages with various settings.
- [`chime_tts.say_url`](https://nimroddolev.github.io/chime_tts/docs/documentation/actions/say_url-action/): Generates a publicly accessible URL to the MP3 file generated by `chime_tts.say`.
- [`chime_tts.replay`](https://nimroddolev.github.io/chime_tts/docs/documentation/actions/replay-action): Repeats the previous action call made to `chime_tts.say`.
- [`chime_tts.clear_cache`](https://nimroddolev.github.io/chime_tts/docs/documentation/actions/clear_cache-action): Clear generated audio cache.
### Notify Entities
Chime TTS adds a [notify platform](https://www.home-assistant.io/integrations/notify/): "[chime_tts](https://nimroddolev.github.io/chime_tts/docs/documentation/notify)", which allows you to create fully customised notify entries for use in your automations and scripts.
***
## Configuration & Documentation
For configuration, examples and documentation check out [the official Chime TTS site](https://nimroddolev.github.io/chime_tts).
## Support and Discussion
For questions, suggestions, and community discussion about Chime TTS, visit our [Community Forum](https://community.home-assistant.io/t/chime-tts-play-audio-before-after-tts-audio-lag-free/578430).
***
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg?style=popout
[forum]: https://community.home-assistant.io/t/chime-tts-play-audio-before-after-tts-audio-lag-free/578430