- Notifications
You must be signed in to change notification settings - Fork40
Custom TTS component for Home Assistant. Utilizes the OpenAI speech engine or any compatible endpoint to deliver high-quality speech. Optionally offers chime and audio normalization features.
License
sfortis/openai_tts
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
The OpenAI TTS component for Home Assistant makes it possible to use the OpenAI API to generate spoken audio from text. This can be used in automations, assistants, scripts, or any other component that supports TTS within Home Assistant.
- Text-to-Speech conversion using OpenAI's API
- Support for multiple languages and voices – No special configuration needed; the AI model auto-recognizes the language.
- Customizable speech model –Check supported voices and models.
- Integration with Home Assistant – Works seamlessly with assistants, automations, and scripts.
- Custom endpoint option – Allows you to use your own OpenAI compatible API endpoint.
- Chime option – Useful for announcements on speakers.(See Devices → OpenAI TTS → CONFIGURE button)
- User-configurable chime sounds – Drop your own chime sound into
config/custom_components/openai_tts/chimefolder (MP3). - Audio normalization option – Uses more CPU but improves audio clarity on mobile phones and small speakers.(See Devices → OpenAI TTS → CONFIGURE button)
- ⭐(New!)Support for new gpt-4o-mini-tts model – A fast and powerful language model.
- ⭐(New!)Text-to-Speech Instructions option – Instruct the text-to-speech model to speak in a specific way (only works with newest gpt-4o-mini-tts model).OpenAI new generation audio models
visit: (https://platform.openai.com/docs/pricing)
service: tts.speaktarget: entity_id: tts.openai_nova_enginedata: cache: true media_player_entity_id: media_player.bedroom_speaker message: My speech has improved now! options: chime: true # Enable or disable the chime chime_sound: signal2 # Name of the file in the chime directory, without .mp3 extension instructions: "Speak like a pirate" # Instructions for text-to-speach model on how to speakGo to the sidebar HACS menu
Click on the 3-dot overflow menu in the upper right and select the "Custom Repositories" item.
Copy/pastehttps://github.com/sfortis/openai_tts into the "Repository" textbox and select "Integration" for the category entry.
Click on "Add" to add the custom repository.
You can then click on the "OpenAI TTS Speech Services" repository entry and download it. Restart Home Assistant to apply the component.
Add the integration via UI, provide API key and select required model and voice. Multiple instances may be configured.
Ensure you have a
custom_componentsfolder within your Home Assistant configuration directory.Inside the
custom_componentsfolder, create a new folder namedopenai_tts.Place the repo files inside
openai_ttsfolder.Restart Home Assistant
Add the integration via UI, provide API key and select required model and voice. Multiple instances may be configured.
About
Custom TTS component for Home Assistant. Utilizes the OpenAI speech engine or any compatible endpoint to deliver high-quality speech. Optionally offers chime and audio normalization features.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.
