Pipecat and Murf
This is an official integration of Murf for Pipecat, a framework for building voice and multimodal conversational AI applications. You can install the Python package pipecat-murf-tts to use Murf as a TTS service in your Pipecat pipelines, providing high-quality voice synthesis with real-time streaming capabilities.
Introduction to Pipecat
Pipecat is an open-source framework developed by Daily that simplifies the creation of voice and multimodal conversational AI applications. It provides a flexible pipeline architecture that allows you to connect various components like speech-to-text (STT), large language models (LLMs), and text-to-speech (TTS) services seamlessly.
With the official Murf TTS integration for Pipecat, you can build sophisticated voice applications that combine Murf’s natural-sounding voices with other AI services, creating end-to-end conversational experiences.
Features
The Murf TTS integration for Pipecat provides a comprehensive set of features for building voice applications:
- High-Quality Voice Synthesis: Leverage Murf’s advanced TTS technology with access to over 150 voices across 35+ languages
- Real-time Streaming: WebSocket-based streaming for low-latency audio generation, perfect for interactive conversations
- Voice Customization: Control voice style, rate, pitch, and variation to match your application’s needs
- Multi-Language Support: Multiple languages and locales with native speaker quality
- Flexible Configuration: Comprehensive audio format and quality options including sample rate, channel type, and output formats
- Metrics Support: Built-in performance tracking and monitoring capabilities
Compatibility
This integration has been tested with Pipecat v0.0.87. For compatibility with other versions, please refer to the Pipecat changelog.
Installation
You can install the Murf TTS integration for Pipecat using several methods:
Using pip
The recommended way to install the package is using pip:
Using uv
If you’re using uv as your Python package manager:
From source
To install from source, clone the repository and install it in development mode:
Quick Start
Get Your Murf API Key
Before you can use the integration, you’ll need a Murf API key. Sign up at the Murf API Dashboard and generate your API key from the dashboard.
Basic Usage
Here’s a simple example of how to initialize and use the Murf TTS service in your Pipecat pipeline:
Complete Example with Pipeline
Here’s a complete example that demonstrates how to build a full conversational AI pipeline with Speech-to-Text (STT), LLM, and Text-to-Speech (TTS) using Deepgram for STT, OpenAI for LLM, and Murf for TTS:
💡 Try it out: For a complete working example with browser-based interaction, check out the Pipecat Quickstart repository. You can clone the repo and replace the TTS service with Murf to see a full STT → LLM → TTS pipeline in action.
Configuration
The MurfTTSService.InputParams class provides extensive configuration options to customize the voice output according to your needs.
InputParams Reference
Example with Custom Configuration
You can customize various aspects of the voice output to match your application’s requirements:
Available Voices
Murf AI offers a wide variety of voices across different languages and styles. You can explore the complete voice library in the Murf API Dashboard.
Some popular voice IDs include:
en-US-natalie- American English, female voiceen-UK-ruby- British English, female voiceen-US-amara- American English, female voice
For a complete list of available voices, visit the Murf API Dashboard.
Environment Variables
To keep your API keys secure, it’s recommended to use environment variables. Create a .env file in your project root:
Then load these variables in your Python code using python-dotenv:
Advanced Features
Dynamic Voice Changes
You can change the voice dynamically during runtime without recreating the service instance:
This is particularly useful for applications that need to switch between different voices or languages during a conversation.
Requirements
The Murf TTS integration for Pipecat has the following requirements:
- Python >= 3.10, < 3.13
- pipecat-ai >= 0.0.87, < 0.1.0
- websockets >= 15.0.1, < 16.0
- loguru >= 0.7.3
- python-dotenv >= 1.1.1
Make sure you have these dependencies installed before using the integration.
Examples
The pipecat-murf-tts repository includes complete working examples that demonstrate various use cases:
- Basic TTS Pipeline: A foundational example showing how to set up a pipeline with LLM and TTS
To run the examples:
For a complete end-to-end example with STT, LLM, and TTS, check out the Pipecat Quickstart repository. You can use it as a starting point and replace the TTS service with Murf to build a full conversational AI application.
Support
If you encounter any issues or have questions about the integration:
- Email: support@murf.ai
- Website: murf.ai
- Documentation: Murf API Documentation
- Issues: GitHub Issues
Contributing
Contributions to the integration are welcome! If you’d like to contribute, please feel free to submit a Pull Request on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.