{
  "openapi": "3.0.1",
  "info": {
    "title": "Vietnamese Text to Speech & Voice Cloning",
    "description": "Vietnamese text to speech at studio quality: 23 built-in voices (North, Central, South accents, male and female), voice cloning from a 3-8 second clip, English-Vietnamese mixed text and emotion cues. MP3, WAV and Opus output. No rental fee - you pay Apify compute only.",
    "version": "1.7",
    "x-build-id": "MAMKbvG7e820Vy9MI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/andrew_babo~vieneu-tts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-andrew_babo-vieneu-tts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/andrew_babo~vieneu-tts/runs": {
      "post": {
        "operationId": "runs-sync-andrew_babo-vieneu-tts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/andrew_babo~vieneu-tts/run-sync": {
      "post": {
        "operationId": "run-sync-andrew_babo-vieneu-tts",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "title": "Text",
            "maxLength": 10000,
            "type": "string",
            "description": "Text to speak. Emotion cues: [cười] (laugh), [thở dài] (sigh), [hắng giọng] (throat clear) — English/unaccented spellings like [laugh] or [tho dai] are mapped automatically; any other bracketed tag is silently dropped and reported in warnings. Inline directives: [tone: hào hứng] switches delivery for the following text (tones: tự nhiên, trầm, nhẹ nhàng, kể chuyện, vui, hào hứng, trang trọng); [pause] or [pause: 1s] inserts silence."
          },
          "voice": {
            "title": "Voice",
            "enum": [
              "Adam",
              "Phạm Tuyên",
              "Xuân Vĩnh",
              "Mạnh Dũng",
              "Minh Quân",
              "Quang Sơn",
              "Minh Đức",
              "Minh Triết",
              "Thanh Bình",
              "Anh Khôi",
              "Thái Sơn",
              "Đức Trí",
              "Trúc Ly",
              "Đoan Trang",
              "Ngọc Huyền",
              "Ngọc Trân",
              "Mai Anh",
              "Thùy Dung",
              "Ngọc Linh",
              "Thục Đoan",
              "Quỳnh Anh",
              "Mỹ Duyên",
              "Kim Thanh"
            ],
            "type": "string",
            "description": "One of the 23 built-in Vietnamese voices (male/female, North / Central / South accent, natural / news / storytelling / audiobook styles). Ignored when a reference audio URL is provided.",
            "default": "Adam"
          },
          "ref_audio_url": {
            "title": "Reference audio URL (voice cloning)",
            "type": "string",
            "description": "Public direct-download URL of a clean 3-8 second clip of one speaker (WAV or MP3, no music). The cloned voice overrides the preset voice, and the emotion of the clip is carried into the output. Only clone voices you own or are authorized to use."
          },
          "denoise": {
            "title": "Denoise the reference clip",
            "type": "boolean",
            "description": "Clean up background noise in the reference clip before cloning the voice.",
            "default": true
          },
          "temperature": {
            "title": "Temperature",
            "minimum": 0.1,
            "maximum": 1.5,
            "type": "number",
            "description": "Expressiveness. ~0.8 is the author's most stable recommendation; higher = more expressive but less stable.",
            "default": 0.8
          },
          "speed": {
            "title": "Speed",
            "type": "string",
            "description": "Playback rate, 1.0 = normal, 1.2 = 20% faster.",
            "default": "1.0"
          },
          "pitch_preserve": {
            "title": "Keep pitch when changing speed",
            "type": "boolean",
            "description": "Time-stretch without the chipmunk/deep-voice effect (ffmpeg atempo). Disable for the old plain resampling.",
            "default": true
          },
          "tone": {
            "title": "Tone preset",
            "enum": [
              "tự nhiên",
              "trầm",
              "nhẹ nhàng",
              "kể chuyện",
              "vui",
              "hào hứng",
              "trang trọng"
            ],
            "type": "string",
            "description": "Delivery style preset (temperature + speed). The model carries emotion in the voice/reference clip itself, so tone presets shift the delivery moderately — for a truly emotional read, supply a reference clip recorded in that emotion. Inline [tone: ...] markers in the text override this per segment."
          },
          "expressiveness": {
            "title": "Expressiveness",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "How much the delivery moves. High can drift into a sing-song, wobbly read on short lines; medium keeps colour without the drift. Overridden by Temperature when that is set explicitly.",
            "default": "medium"
          },
          "precision": {
            "title": "Precision",
            "enum": [
              "auto",
              "fp32",
              "int8"
            ],
            "type": "string",
            "description": "Auto uses fp32 in Smooth mode and int8 in Fast mode. int8 is quicker on Apify CPUs but adds a faint metallic buzz that is most audible in expressive speech.",
            "default": "auto"
          },
          "format": {
            "title": "Output format",
            "enum": [
              "wav",
              "mp3",
              "opus"
            ],
            "type": "string",
            "description": "Container/codec of the returned audio file.",
            "default": "wav"
          },
          "quality": {
            "title": "Quality mode",
            "enum": [
              "smooth",
              "fast"
            ],
            "type": "string",
            "description": "Smooth renders short text in a single pass so there are no chunk seams — up to 400 characters, or ~900 characters when the text contains emotion cues. Fast always parallelizes; quicker, with a small risk of audible seams.",
            "default": "smooth"
          },
          "trim_silence": {
            "title": "Trim leading/trailing silence",
            "type": "boolean",
            "description": "Default: on, but automatically off when the text contains emotion cues so laugh/sigh tails are not clipped."
          },
          "single_pass": {
            "title": "Force single-pass rendering",
            "type": "boolean",
            "description": "Render the whole text on one engine, no matter how long it is. Seamless by definition, but slower on long text. Emotional text (with cues) already stays single-pass up to ~900 characters.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}