Community-maintained integration. This service is built and maintained by snehmehta. Pipecat does not test or officially support it. Please report issues and request changes on the source repository. Learn more about community integrations.
Overview
MiraiTTSService converts text into speech using Mirai’s
streaming text-to-speech API, built for Indian languages: Hindi, Hinglish (Devanagari
with English words in Latin script) and Gujarati. Audio streams over HTTP with about
100 ms to first audio, and is resampled from Mirai’s 48 kHz to your pipeline’s output
rate, including 8 kHz for phone calls.
The package also includes:
MiraiRealtimeLLMService, for Mirai’s speech-to-speech Realtime API (OpenAI Realtime protocol). Speech recognition, turn detection, the model and the voice run together on Mirai’s side, and this one service replaces STT, LLM and TTS.apply_output_lead(), which stops audio breaking up on phone calls over Pipecat’s websocket transports when the bot’s server is busy. It works with any TTS service.
Source Repository
Source code, examples, benchmark and issues for the Mirai integration
Mirai
Learn more about Mirai’s text-to-speech API
Installation
This is a community-maintained package distributed separately frompipecat-ai:
Prerequisites
Mirai Account Setup
Before using the Mirai text-to-speech service, you need:- Mirai Account: Sign up in the Mirai console
- API Key: Create an API key (
sk_live_...) in the console - Voice Selection: Choose
ashu,neha,shrutiorsameer
Required Environment Variables
MIRAI_API_KEY: Your Mirai API key for authentication
Configuration
str
default:"None"
Mirai API key. Defaults to the
MIRAI_API_KEY environment variable.MiraiTTSService.Settings
default:"None"
Runtime-configurable settings:
voice (default "neha") and model (default
"mira-tts").int
default:"None"
Output sample rate. Defaults to the pipeline’s
audio_out_sample_rate.str
default:"https://sandbox.voice.miraiminds.co/v1"
API base URL.