Migration Guide for Play AI's TTS API

With Play.ai’s acquisition by Meta and subsequent service disruption, many developers are looking for a reliable alternative for their text-to-speech streaming needs. Murf offers a powerful, feature-rich streaming TTS API that provides an excellent migration path for Play.ai users.

This guide will help you seamlessly transition from Play.ai’s streaming API to Murf’s streaming solution.

Why Choose Murf?

Unparalleled Pronunciation Accuracy

Over 99% pronunciation accuracy for natural, precise speech

Superior Quality

Advanced GEN2 model for natural, human-like speech

Global Scale

Over 150 voices across 21+ languages and accents

Developer-First

Comprehensive SDKs, detailed documentation, and responsive support

Quick Migration Overview

FeaturePlay.aiMurfMigration Notes
EndpointPOST /api/v1/tts/streamPOST /v1/speech/streamSimple URL change
AuthenticationX-USER-ID + Authorizationapi-key headerSimplified auth
Voice SelectionS3 paths or voice namesVoice IDs or namesMore intuitive naming
Audio Formatsmp3, mulaw, raw, wav, ogg, flacMP3, WAV, PCMSupports all essential formats
Advanced FeaturesLimited customizationpronunciation, styles, MultiNative LocaleMore control options

Step-by-Step Migration

1

Get Your Murf API Key

Sign up at Murf API Dashboard and generate your API key. Store it securely as an environment variable if needed.

2

Test Connectivity

Verify your API key works with a simple request: bash curl -X GET https://api.murf.ai/v1/speech/voices \ -H "api-key: YOUR_API_KEY"

3

API Endpoint Migration

Change the API endpoint to Murf’s.

Play.ai Endpoint:

POST https://api.play.ai/api/v1/tts/stream

Murf Endpoint:

POST https://api.murf.ai/v1/speech/stream
4

Authentication Changes

Play.ai uses X-USER-ID and Authorization headers for authentication. Murf uses api-key header. Make sure to update your code to use the new header.

1const headers = {
2'X-USER-ID': 'your-user-id',
3'Authorization': 'Bearer YOUR_API_KEY',
4'Content-Type': 'application/json'
5};
5

Request Body Parameter Mapping

Change the request body parameters to match Murf’s parameters. Only text, and voiceId are the required parameters and all other parameters are optional.

Play.ai ParameterMurf ParameterNotes
texttextDirect mapping, no need to change
voicevoiceIdUse a murf voice ID, you can choose from here
output_formatformat”MP3”, “WAV”, or “PCM”
sample_ratesampleRate8000, 24000, 44100, or 48000
speedrateRange: -50 to +50 (vs Play.ai’s decimal values)

Any other Play.ai parameter that was not listed above should be removed. To see the full list of parameters that you can use, please refer to the Murf Streaming API Reference.

6

Process the Response

Both Play.ai and Murf return the audio stream in the response body. You can use the same code to process the response.

Code Migration Examples

1import requests
2
3url = "https://api.play.ai/api/v1/tts/stream"
4headers = {
5 "X-USER-ID": "your-user-id",
6 "Authorization": "Bearer YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9data = {
10 "text": "Hello, this is a test message.",
11 "voice": "s3://voice-cloning-zero-shot/path/to/voice",
12 "voice_engine": "Play3.0",
13 "output_format": "mp3",
14 "sample_rate": 44100,
15 "speed": 1.0
16}
17
18response = requests.post(url, headers=headers, json=data, stream=True)
19with open("audio.mp3", "wb") as f:
20 for chunk in response.iter_content(chunk_size=1024):
21 f.write(chunk)

Voice Migration Guide

Finding Equivalent Voices

Play.ai used complex S3 paths for voice selection. Murf uses intuitive voice names and IDs.

Play.ai Voice Examples:

s3://voice-cloning-zero-shot/d9ff78ba-d016-47f6-b0ef-dd630f59414e/female-cs/manifest.json

Murf Voice Examples:

"en-US-natalie" // Female, US English
"en-UK-oliver" // Male, UK English
"es-ES-sofia" // Female, Spanish
"fr-FR-marcel" // Male, French

To programmatically fetch the list of voices, use the List voices endpoint.

1from murf import Murf
2
3client = Murf(api_key="YOUR_API_KEY")
4voices = client.voices.list()
5
6for voice in voices:
7 print(f"{voice.voice_id} - {voice.display_name} ({voice.gender})")

Rate Limits & Concurrency

You can find more information about the rate limits and concurrency in our Rate Limits page.

Getting Help

Migration Support

Need help with your migration? Our team is here to assist:

  • Migration consultation: Free 30-minute consultation to review your use case
  • Custom voice matching: Help finding the perfect voice equivalents
  • Code review: Technical review of your migration implementation
  • Priority support: Expedited support during your migration period

Contact our migration team to get started.


Ready to migrate? Start with our Streaming Quickstart Guide or generate your API key to begin testing immediately.