> This page is for version v2026.01.16-dev.
> For other versions, use one of these documentation indexes:
> - latest (default): https://docs.machanirobotics.dev/latest/llms.txt
> - v2026.01.16-dev: https://docs.machanirobotics.dev/v-2026-01-16-dev/llms.txt

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

# Speech Events

GET https://api.machanirobotics.com/v1/conversation/speech/speeches/{speeche}:speechEvents

Streams speech-related events from an active speech processing session.
This is a custom method that operates on a specific Speech resource.
HTTP Mapping: GET /v1/conversation/speech/\{name=speeches/\*}:speech\_events

Reference: https://docs.machanirobotics.dev/v-2026-01-16-dev/2026-01-16-dev/2026-01-16-dev/speech-service/speechevents

## Request

### Path parameters

- `speeche` (string, required) — The speeche id.

## Response

### 200

OK

- `speech` (Speech, optional) — The current state of the speech processing session. Indicates relevant status information of the ongoing or completed speech processing.
- `state` (integer, optional) — The current state of the speech processing session.

## Errors

### 400 Bad Request Error

Bad Request

- `code` (integer, optional) — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
- `message` (string, optional) — A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
- `details` (list of GoogleProtobufAny, optional) — A list of messages that carry the error details. There is a common set of message types for APIs to use.

## Types

### Speech

Speech represents a speech output resource that the bot can speak. It encapsulates all necessary information for synthesizing speech, including the text content, language, processing service, and output configurations.

- `displayName` (string, required) — display name contains the display name for the relevant speech.
- `content` (string, required) — content contains the actual textual content to be converted into speech. This field is required to generate the speech output.
- `service` (integer, required) — service specifies the speech processing service to use for generating the speech. It must be one of the defined values in the SpeechProcessingService enum.
- `languageTag` (InferenceLanguage, required) — language specifies the language of the speech content.
- `name` (string, optional) — name is the resource identifier for the Speech. It follows the format "speeches/\{speech}" and uniquely identifies a Speech resource.
- `speed` (double, optional) — speed defines the playback speed of the generated speech. This optional field allows for customization of the speech delivery rate.
- `outputFormat` (integer, optional) — output_format determines the file format for the synthesized speech audio, such as MP3 or WAV. This field is optional and depends on the capabilities of the selected service.
- `duration` (string, optional) — duration specifies the maximum length of the speech output in seconds. This field is required to limit the length of the generated speech.
- `audioUri` (string, optional) — Storage URI for the synthesized speech audio. This field is optional and depends on the capabilities of the selected service.
- `type` (integer, optional) — type specifies the storage behavior of the speech output. It indicates whether the generated speech should be persisted for future reference or treated as transient.

### GoogleProtobufAny

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

- `@type` (string, optional) — The type of the serialized message.

### InferenceLanguage

InferenceLanguage is the language code for the robot's conversation.

- `countryTag` (integer, required) — The country code for the robot's conversation.
- `languageTag` (integer, required) — The language code for the robot's conversation.
- `inputAudio` (string, optional) — The audio input for the robot's conversation.
- `inputText` (string, optional) — The text input for the robot's conversation.
- `inputSpeech` (string, optional) — The speech input for the robot's conversation.
- `inputNone` (boolean, optional) — The none input for the robot's conversation.
- `outputAudio` (string, optional) — The audio output for the robot's conversation.
- `outputText` (string, optional) — The text output for the robot's conversation.
- `outputSpeech` (string, optional) — The speech output for the robot's conversation.
- `outputNone` (boolean, optional) — The none output for the robot's conversation.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "speech": {
    "displayName": "Welcome Greeting",
    "content": "Hello, welcome to Machani Robotics. How can I assist you today?",
    "service": 2,
    "languageTag": {
      "countryTag": 840,
      "languageTag": 1033,
      "inputAudio": "audio/wav",
      "inputText": "text/plain",
      "inputSpeech": "speech/pcm",
      "inputNone": false,
      "outputAudio": "audio/mp3",
      "outputText": "text/plain",
      "outputSpeech": "speech/wav",
      "outputNone": false
    },
    "name": "speeches/abc123xyz",
    "speed": 1,
    "outputFormat": 3,
    "duration": "12.345s",
    "audioUri": "https://storage.machanirobotics.com/speeches/abc123xyz/output.mp3",
    "type": 1
  },
  "state": 2
}
```

**SDK Code**

```python
import requests

url = "https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents';
const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'};

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

```go
package main

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

func main() {

	url := "https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", 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
require 'uri'
require 'net/http'

url = URI("https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents")

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

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

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

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

HttpResponse<String> response = Unirest.get("https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.machanirobotics.com/v1/conversation/speech/speeches/speeche:speechEvents")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```