Assets
Generative AI

Generate Speech Asset

Changed on

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.

post/cloud/v2/universes/{universe_id}:generateSpeechAsset

Request

  • Base URL
    https://apis.roblox.com
  • URL
    https://apis.roblox.com/cloud/v2/universes/{universe_id}:generateSpeechAsset
  • Auth
    • API key in header x-api-key
    • or OAuth 2
      Authorization code: https://apis.roblox.com/oauth/v1/authorize
      Token URL: https://apis.roblox.com/oauth/v1/token scopes: universe:write, asset:read, asset:write

Path parameters

universe_idstring required

The universe ID.

Request body

textstring required

The text to be translated.

Example request

{
  "text": "Hello",
  "speechStyle": {
    "voiceId": "1"
  }
}

Response

OK

pathstring

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}.

doneboolean

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.

Example response

{
  "done": true
}

Changes

    • info

      the security scope asset:read was added to the endpoint's security scheme roblox-oauth2

    • info

      the security scope asset:write was added to the endpoint's security scheme roblox-oauth2

    • info

      the security scope universe:write was added to the endpoint's security scheme roblox-oauth2