Skip to content

Fish Audio 音声クローニング

  • 2025.9.14 当サイトは fish-tts モデルをサポートしました
  • イーロン・マスク、趙本山、猪八戒、孫悟空などの音声クローニングを含む多数の組み込み音声
  • 感情コントロール Emotion Control をサポート
  • 独自の音声ファイルをアップロードしてクローニング可能
  • OpenAI TTS /v1/audio/speech インターフェースと完全互換

価格

  • 為替レート 1:3 での価格設定
  • 公式サイト:100万UTF-8バイトあたり $15.00 USD
  • 当サイト:100万UTF-8バイトあたり ¥45.00 CNY

API

  • 規約:リクエストヘッダーに Authorization: Bearer hk-your-key を含める

1. 音声クローン

post https://api.openai-hk.com/v1/audio/speech

shell
curl --request POST \
  --url https://api.openai-hk.com/v1/audio/speech \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "fish-tts",
    "input": "(高兴) 师傅,我想娶媳妇",
    "voice": "d7900c21663f485ab63ebdb7e5905036"
}'  \
  --output speech.mp3
curl --request POST \
  --url https://api.openai-hk.com/v1/audio/speech \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "fish-tts",
    "input": "(高兴) 师傅,我想娶媳妇",
    "voice": "d7900c21663f485ab63ebdb7e5905036"
}'  \
  --output speech.mp3
  • 出力は mp3 形式、ヘッダー Content-Type: application/octet-stream

  • レスポンスヘッダーには task-id: b7f228140bd949d7b466e1c33566a2fd が含まれます

  • この task-id により、mp3 リンクは https://platform.r2.fish.audio/task/b7f228140bd949d7b466e1c33566a2fd.mp3 となります

  • voice は音声クローンソースです。d7900c21663f485ab63ebdb7e5905036 は猪八戒の音声で、Fish Audio のモデル ID を指定できます

  • より多くの音声ソースは API 経由で取得するか、独自の音声をアップロードしてクローニングできます

  • input はコンテンツです。コンテンツ内で感情コントロールタグをサポートしています — 公式ドキュメント

  • JSON 形式を返す

リクエストボディ

json
{
  "model": "fish-tts",
  "input": "(高兴) 师傅,我想娶媳妇",
  "voice": "d7900c21663f485ab63ebdb7e5905036",
  "response_format": "url"
}
{
  "model": "fish-tts",
  "input": "(高兴) 师傅,我想娶媳妇",
  "voice": "d7900c21663f485ab63ebdb7e5905036",
  "response_format": "url"
}

パラメータ説明

パラメータタイプ説明
modelstring音声クローンモデル名
inputstringテキストコンテンツ
voicestring音声クローンソース、Fish Audio のモデル ID
response_formatstringレスポンス形式、デフォルトは stream、url も指定可能

レスポンス

json
{
  "audio_url": "https://platform.r2.fish.audio/task/ad68621d26334758922403bd2d0a4bd4.mp3"
}
{
  "audio_url": "https://platform.r2.fish.audio/task/ad68621d26334758922403bd2d0a4bd4.mp3"
}

2. 独自の音声クローンソースを作成

post https://api.openai-hk.com/fish/model

shell
curl --request POST \
  --url https://api.openai-hk.com/fish/model \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "title":"Teacher"
    ,"description":"Description"
    ,"voices":"https://platform.r2.fish.audio/task/604133d7b3c7430385382470f67770e8.mp3"
    ,"cover_image":"https://www.open-hk.com/res/img/open.png"
    ,"train_mode":"fast"

}'
curl --request POST \
  --url https://api.openai-hk.com/fish/model \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'Content-Type: application/json' \
  --data '{
    "title":"Teacher"
    ,"description":"Description"
    ,"voices":"https://platform.r2.fish.audio/task/604133d7b3c7430385382470f67770e8.mp3"
    ,"cover_image":"https://www.open-hk.com/res/img/open.png"
    ,"train_mode":"fast"

}'
  • 悪用防止のため、各呼び出しで 50 クレジットが消費されます

  • パラメータ説明

    パラメータタイプ説明
    titlestring音声クローン名
    descriptionstring音声クローン説明
    voicesstring音声ファイル URL
    cover_imagestringカバー画像
    train_modestring音声クローントレーニングモード
    is_saveboolデフォルトは false。モデルを保持するかどうか — 保存しない場合、10分後に削除されます
  • レスポンスボディ

_idvoice パラメータとして使用します

json
{
  "_id": "d3645891f9e742108c313e66271394ac",
  "type": "tts",
  "title": "老师",
  "description": "描述",
  "cover_image": "coverimage/d3645891f9e742108c313e66271394ac",
  "train_mode": "fast",
  "state": "trained",
  "tags": [],
  "samples": [
    {
      "title": "Default Sample",
      "text": "通过光合作用,植物能够将阳光转化为生命所需的能量。这个精密的生物化学过程不仅维持了植物的生长,更为地球上的氧气循环做出了重要贡献,展现了自然界的奇妙平衡。",
      "task_id": "1ae43d4f956d4744b7ecb6c6d54e4437",
      "audio": "task/1ae43d4f956d4744b7ecb6c6d54e4437.mp3"
    }
  ],
  "created_at": "2025-09-14T15:10:09.033883Z",
  "updated_at": "2025-09-14T15:10:09.033485Z",
  "languages": ["zh"],
  "visibility": "public",
  "lock_visibility": false,
  "default_text": "通过光合作用,植物能够将阳光转化为生命所需的能量。这个精密的生物化学过程不仅维持了植物的生长,更为地球上的氧气循环做出了重要贡献,展现了自然界的奇妙平衡。",
  "like_count": 0,
  "mark_count": 0,
  "shared_count": 0,
  "task_count": 0,
  "unliked": false,
  "liked": false,
  "marked": false
}
{
  "_id": "d3645891f9e742108c313e66271394ac",
  "type": "tts",
  "title": "老师",
  "description": "描述",
  "cover_image": "coverimage/d3645891f9e742108c313e66271394ac",
  "train_mode": "fast",
  "state": "trained",
  "tags": [],
  "samples": [
    {
      "title": "Default Sample",
      "text": "通过光合作用,植物能够将阳光转化为生命所需的能量。这个精密的生物化学过程不仅维持了植物的生长,更为地球上的氧气循环做出了重要贡献,展现了自然界的奇妙平衡。",
      "task_id": "1ae43d4f956d4744b7ecb6c6d54e4437",
      "audio": "task/1ae43d4f956d4744b7ecb6c6d54e4437.mp3"
    }
  ],
  "created_at": "2025-09-14T15:10:09.033883Z",
  "updated_at": "2025-09-14T15:10:09.033485Z",
  "languages": ["zh"],
  "visibility": "public",
  "lock_visibility": false,
  "default_text": "通过光合作用,植物能够将阳光转化为生命所需的能量。这个精密的生物化学过程不仅维持了植物的生长,更为地球上的氧气循环做出了重要贡献,展现了自然界的奇妙平衡。",
  "like_count": 0,
  "mark_count": 0,
  "shared_count": 0,
  "task_count": 0,
  "unliked": false,
  "liked": false,
  "marked": false
}

3. 公式音声ソース

get https://api.openai-hk.com/fish/q/model?page_size=10&page_number=1&title=&language=zh&sort_by=task_count

レスポンスボディ — _idvoice パラメータとして使用します

json
{
  "total": 272820,
  "items": [
    {
      "_id": "54a5170264694bfc8e9ad98df7bd89c3",
      "type": "tts",
      "title": "丁真",
      "description": "",
      "cover_image": "coverimage/54a5170264694bfc8e9ad98df7bd89c3",
      "train_mode": "fast"
    },
    ......,
    {}
  ]
}
{
  "total": 272820,
  "items": [
    {
      "_id": "54a5170264694bfc8e9ad98df7bd89c3",
      "type": "tts",
      "title": "丁真",
      "description": "",
      "cover_image": "coverimage/54a5170264694bfc8e9ad98df7bd89c3",
      "train_mode": "fast"
    },
    ......,
    {}
  ]
}

4. 感情およびコントロールタグ

  • 文頭:(Angry) これがあなたの恩返しですか?
  • 文中:私はあなたをとても信頼していました、(Angry) これがあなたの恩返しですか?
  • スピードアップ:走って!誰かが追いかけてきています、(speed up) 今走らないと手遅れになります!
  • スローダウン:彼は一語一語ゆっくりと話しました、(slow down) まるで各単語が千斤の重さを持つかのように。
  • 音量を下げる:彼は私の耳に近づき、(lower volume) 静かに秘密を教えてくれました。
  • 音量を上げる:(Loud) 何と言いましたか?聞こえません!
  • 興奮した口調:これは信じられない!(Excited) 私たちは実際に成功しました!
  • 笑う:ジョークを聞いて、彼はもう我慢できませんでした、(laugh) ハハハ!
  • 泣く:彼女は顔を覆い、(cry) すすり泣き、もう一言も言えませんでした。
  • ため息:どうしてこんなことに... (sigh) ああ。

5. 公式 /v1/tts インターフェース

post https://api.openai-hk.com/fish/v1/tts

shell
curl --request POST \
  --url https://api.openai-hk.com/fish/v1/tts \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'format: url' \
  --header 'model: s2-pro' \
  --data '{
    "text": "[嘿嘿]你说什么?",
    "reference_id": "5c353fdb312f4888836a9a5680099ef0",
    "temperature": 0.7,
    "top_p": 0.7,
    "prosody": {
      "speed": 1,
      "volume": 0,
      "normalize_loudness": true
    },
    "chunk_length": 300,
    "normalize": true,
    "format": "mp3",
    "sample_rate": 44100,
    "mp3_bitrate": 128,
    "latency": "normal",
    "max_new_tokens": 1024,
    "repetition_penalty": 1.2,
    "min_chunk_length": 50,
    "condition_on_previous_chunks": true,
    "early_stop_threshold": 1,
    "references":[{
        "audio_url":"http://cos.aitutu.cc/mp4/ru-user-voice.mp3",
        "text":"Hello! Welcome to Fish Audio."
    }]
  }'
curl --request POST \
  --url https://api.openai-hk.com/fish/v1/tts \
  --header 'Authorization: Bearer hk-your-key' \
  --header 'format: url' \
  --header 'model: s2-pro' \
  --data '{
    "text": "[嘿嘿]你说什么?",
    "reference_id": "5c353fdb312f4888836a9a5680099ef0",
    "temperature": 0.7,
    "top_p": 0.7,
    "prosody": {
      "speed": 1,
      "volume": 0,
      "normalize_loudness": true
    },
    "chunk_length": 300,
    "normalize": true,
    "format": "mp3",
    "sample_rate": 44100,
    "mp3_bitrate": 128,
    "latency": "normal",
    "max_new_tokens": 1024,
    "repetition_penalty": 1.2,
    "min_chunk_length": 50,
    "condition_on_previous_chunks": true,
    "early_stop_threshold": 1,
    "references":[{
        "audio_url":"http://cos.aitutu.cc/mp4/ru-user-voice.mp3",
        "text":"Hello! Welcome to Fish Audio."
    }]
  }'
  • model はヘッダーに配置します。s2-pros1 をサポート

  • URL を返すには、ヘッダーに format: url を追加します。デフォルトはストリームを返します

  • パラメータ説明

パラメータタイプ説明
textstringテキストコンテンツ
reference_idstring音声音色クローン ID
referencesobject音声音色クローンリファレンス。reference_id に値がある場合は無視されます
references[0].audio_urlstring音声音色クローン音声 URL。時間 10s~270s。mp3 と wav をサポート
references[0].textstring音声音色クローンのリファレンスサンプルテキスト