> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://murf.ai/api/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://murf.ai/api/docs/_mcp/server.

# Stream Speech

POST https://api.murf.ai/v1/speech/stream
Content-Type: application/json

Synthesize speech with ultra-low latency over a streaming connection.
Choose the `Base URL` from the URL dropdown (Global URL or a pinned Region)

**Note**: Global URL auto-routes to the nearest region.
| Region         | URL                                       | Default Concurrency |
| ------------------------- | ---------------------------------------------- | -------------------- |
| Global (Routes to the nearest server) | `https://global.api.murf.ai/v1/speech/stream`     | Region specific concurrency |
| US-East                   | `https://us-east.api.murf.ai/v1/speech/stream`    | 5 |
| US-West                   | `https://us-west.api.murf.ai/v1/speech/stream`    | 2 |
| India                     | `https://in.api.murf.ai/v1/speech/stream`         | 2 |
| Canada                    | `https://ca.api.murf.ai/v1/speech/stream`         | 2 |
| South Korea               | `https://kr.api.murf.ai/v1/speech/stream`         | 2 |
| UAE                       | `https://me.api.murf.ai/v1/speech/stream`         | 2 |
| Japan                     | `https://jp.api.murf.ai/v1/speech/stream`         | 2 |
| Australia                 | `https://au.api.murf.ai/v1/speech/stream`         | 2 |
| EU (Central)              | `https://eu-central.api.murf.ai/v1/speech/stream` | 2 |
| UK                        | `https://uk.api.murf.ai/v1/speech/stream`         | 2 |
| South America (São Paulo) | `https://sa-east.api.murf.ai/v1/speech/stream`    | 2 |


Reference: https://murf.ai/api/docs/api-reference/text-to-speech/stream

## Servers

- `https://api.murf.ai` (Base)
- `https://global.api.murf.ai` (Global Router)
- `https://us-east.api.murf.ai` (US East)
- `https://us-west.api.murf.ai` (US West)
- `https://in.api.murf.ai` (India)
- `https://ca.api.murf.ai` (Canada)
- `https://kr.api.murf.ai` (South Korea)
- `https://me.api.murf.ai` (UAE)
- `https://jp.api.murf.ai` (Japan)
- `https://au.api.murf.ai` (Australia)
- `https://eu-central.api.murf.ai` (EU Central)
- `https://uk.api.murf.ai` (UK)
- `https://sa-east.api.murf.ai` (South America)

## Request

### Headers

- `token` (string, optional)
- `api-key` (string, optional)

### Body (application/json)

This endpoint expects a GenerateSpeechStreamingRequest.

- `text` (string, required) — The text that is to be synthesised. e.g. 'Hello there [pause 1s] friend'
- `voiceId` (string, required) — Use the GET /v1/speech/voices API to find supported voiceIds. You can use either the voiceId (e.g. en-US-natalie) or just the voice actor's name (e.g. natalie).
- `model` (enum, optional, default: falcon-2) — The model to use for audio output. Valid values: falcon-2.
  - Allowed values: `falcon-2`
- `channelType` (string, optional, default: MONO) — Valid values: STEREO, MONO
- `format` (string, optional, default: WAV) — Format of the generated audio file.Valid values: MP3, FLAC, WAV, ALAW, ULAW, OGG, PCM
- `locale` (string, optional) — Specifies the language for the generated audio, enabling a voice to speak in multiple languages natively. Valid values: "en-US", "en-UK", "es-ES", etc. Use the GET /v1/speech/voices endpoint to retrieve the list of available voices and languages.
- `pitch` (integer, optional) — Pitch of the voiceover
- `rate` (integer, optional) — Speed of the voiceover
- `sampleRate` (double, optional, default: 24000) — Valid values are 8000, 16000, 24000, 44100, 48000. Defaults to 24000.
- `style` (string, optional) — The voice style to be used for voiceover generation.
- `volumeOffset` (integer, optional, default: 0) — Adjusts loudness relative to the model's default output. Positive values increase level; negative values decrease. 0 leaves audio as generated. The scale is proportional across voices and utterances.
- `multiNativeLocale` (string, optional, deprecated) — This field is superseded by `locale` field. Please migrate to `locale` field to ensure compatibility with future API versions. Specifies the language for the generated audio, enabling a voice to speak in multiple languages natively. Valid values: "en-US", "en-UK", "es-ES", etc. Use the GET /v1/speech/voices endpoint to retrieve the list of available voices and languages.

## Response

### 200

Ok

## Errors

### 400 Bad Request Error

Bad Request

- `any`

### 402 Payment Required Error

Expired subscription or character limit exhausted

- `any`

### 403 Forbidden Error

Invalid or expired token/api-key provided

- `any`

### 500 Internal Server Error

Internal Server Error

- `any`

### 503 Service Unavailable Error

Service Unavailable

- `any`

## Examples

**Request**

```json
{
  "text": "Hi, How are you doing today?",
  "voiceId": "Gordon",
  "model": "falcon-2",
  "locale": "en-US"
}
```

**Response**

```json
{}
```

**SDK Code**

```python Basic Example
from murf import Murf, MurfRegion
client = Murf(
    api_key="YOUR_API_KEY",
    region=MurfRegion.GLOBAL
)
audio_stream = client.text_to_speech.stream(
    text="Hi, How are you doing today?",
    voice_id="Gordon",
    model="falcon-2",
    locale="en-US",
    sample_rate=24000
)

```

```javascript Basic Example
const url = 'https://api.murf.ai/v1/speech/stream';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"text":"Hi, How are you doing today?","voiceId":"Gordon","model":"falcon-2","locale":"en-US"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Basic Example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.murf.ai/v1/speech/stream"

	payload := strings.NewReader("{\n  \"text\": \"Hi, How are you doing today?\",\n  \"voiceId\": \"Gordon\",\n  \"model\": \"falcon-2\",\n  \"locale\": \"en-US\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Basic Example
require 'uri'
require 'net/http'

url = URI("https://api.murf.ai/v1/speech/stream")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"text\": \"Hi, How are you doing today?\",\n  \"voiceId\": \"Gordon\",\n  \"model\": \"falcon-2\",\n  \"locale\": \"en-US\"\n}"

response = http.request(request)
puts response.read_body
```

```java Basic Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.murf.ai/v1/speech/stream")
  .header("Content-Type", "application/json")
  .body("{\n  \"text\": \"Hi, How are you doing today?\",\n  \"voiceId\": \"Gordon\",\n  \"model\": \"falcon-2\",\n  \"locale\": \"en-US\"\n}")
  .asString();
```

```php Basic Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.murf.ai/v1/speech/stream', [
  'body' => '{
  "text": "Hi, How are you doing today?",
  "voiceId": "Gordon",
  "model": "falcon-2",
  "locale": "en-US"
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Basic Example
using RestSharp;

var client = new RestClient("https://api.murf.ai/v1/speech/stream");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"text\": \"Hi, How are you doing today?\",\n  \"voiceId\": \"Gordon\",\n  \"model\": \"falcon-2\",\n  \"locale\": \"en-US\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Basic Example
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "text": "Hi, How are you doing today?",
  "voiceId": "Gordon",
  "model": "falcon-2",
  "locale": "en-US"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.murf.ai/v1/speech/stream")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```