---
title: "Generate Speech Asset"
method: POST
path: "/cloud/v2/universes/{universe_id}:generateSpeechAsset"
tags: ["Assets", "Generative AI"]
---

# Generate Speech Asset

`POST /cloud/v2/universes/{universe_id}:generateSpeechAsset`

Generates an English speech audio asset from the specified text.

This endpoint requires the `asset:read` and `asset:write` scopes in
addition to the `universe:write` scope.

The response returns an `Operation` object that must be prefixed with
`/assets/v1`. For example, the URL to discover the result of the operation
could be
`https://apis.roblox.com/assets/v1/operations/8b42ef30-9c17-4526-b8cf-2ff0136ca94d`.

## Path parameters

- `universe_id` string, required

## Request body

- GenerateSpeechAssetRequest — Specifies the text from which to generate speech and the voice style.
  - `text` string, required — The text to be translated.
  - `speechStyle` GenerateSpeechAssetRequestGeneratedSpeechStyle — Information about the style of generated speech.
    - `voiceId` string — An ID corresponding to the voice type specified. A mapping of voice type to ID number is available in the documentation.
    - `pitch` number, double — The pitch of the generated speech.
    - `speed` number, double — The speed of the generated speech.

## Response `200`

OK

- Operation — This resource represents a long-running operation that is the result of a network API call.
  - `path` string — The server-assigned path, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `path` should be a resource path ending with `operations/{unique_id}`.
  - `metadata` GoogleProtobufAny — Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
    - `@type` string — The type of the serialized message.
  - `done` boolean — If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
  - `error` Status — The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
    - `code` integer — The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
    - `message` string — 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` GoogleProtobufAny[] — A list of messages that carry the error details. There is a common set of message types for APIs to use.
      - `@type` string — The type of the serialized message.
  - `response` GoogleProtobufAny — Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
    - `@type` string — The type of the serialized message.

---

[API](https://skmtc.net/roblox/apis/roblox-api.md) · [All operations](https://skmtc.net/roblox/apis/roblox-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/roblox/roblox-api/revisions/1d2042bb1a48/schema)
