Play.HT
    • Stream Audio From Text
      POST
    • Generate Audio From Text
      POST
    • Get Text-To-Speech Job Data
      GET
    • List PlayHT Voices
      GET
    • Create Instant Voice Clone (via file upload)
      POST
    • Create Instant Voice Clone (via file URL)
      POST
    • List Cloned Voices
      GET
    • Delete Cloned Voices
      DELETE
    • Timestamp From Audio
      POST
    • Get Transcription Job Data
      GET
    • Convert Plain Text To Speech
      POST
    • Convert SSML To Speech
      POST
    • Get Conversion Job Status
      GET
    • Get Available Voices
      GET

      Get Text-To-Speech Job Data

      Develop Env
      https://dev.your-api-server.com
      Develop Env
      https://dev.your-api-server.com
      GET
      /api/v2/tts/{id}
      Retrieves information about an async text-to-speech job.
      Depending on the accept header, the API returns either the job data in JSON format, a text event-stream of the job's progress or a byte stream of the generated audio file.
      If the accept header contains accept: application/json or accept: */*, the endpoint responds with data about the requested job:
      Status: 200 - OK
      Body: the job data (e.g., job status, progress, etc.)
      If the accept header contains accept: text/event-stream or the query param ?format=event-stream is present, it responds with a text event-stream about the job progress:
      Status: 200 - OK
      Body: an event stream that provides updates on the job's progress
      If the accept header contains accept: audio/mpeg or the query param ?format=audio-mpeg is present, it responds with a byte stream of the generated audio file:
      Status: 200 - OK
      Body: streams audio file in the MP3 format or HTTP 406 if the file was not generated as MP3.

      Request

      Path Params

      Responses

      🟢200Success
      application/json
      Bodyapplication/json

      🟠401Unauthorized
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location 'https://dev.your-api-server.com/api/v2/tts/'
      Response Response Example
      200 - Success
      {
        "id": "f0gZrOKBKL7veJ6o1M",
        "created": "2023-03-04T01:12:03.981Z",
        "input": {
          "text": "Hello! Said the realistic voice.",
          "voice": "s3://voice-cloning-zero-shot/d9ff78ba-d016-47f6-b0ef-dd630f59414e/female-cs/manifest.json",
          "quality": "draft",
          "output_format": "mp3",
          "speed": 1,
          "sample_rate": 24000,
          "seed": null,
          "temperature": null,
          "voice_engine": "PlayHT2.0",
          "emotion": "female_happy",
          "voice_guidance": 3,
          "style_guidance": 20
        },
        "output": {
          "duration": 1.664,
          "size": 35085,
          "url": "https://peregrine-results.s3.amazonaws.com/pigeon/f0gZrOKBKL7veJ6o1M_0.mp3"
        },
        "_links": [
          "{\n  href: 'https://play.ht/api/v2/tts/f0gZrOKBKL7veJ6o1M',\n  method: 'GET',\n  contentType: 'application/json',\n  rel: 'self',\n  description: \"Fetches this job's data. Poll it for the latest status.\",\n}\n"
        ]
      }
      Modified at 2024-07-30 05:56:42
      Previous
      Generate Audio From Text
      Next
      List PlayHT Voices
      Built with