文件
歌聲生成(Beta-v2)
你可以輸入樂譜,包含每個字的開始和結束時間以及每個字的音高後,你就可以下載完整的人聲音檔。你也可以使用「歌聲樂譜生成」API來自動產出AI編曲,取代人工定義與輸入。
** melodicPhrases 限制要減少,由 model 做掉
發起請求
Request
URL: /vocal
Method: POST
Header
Name
| Type
| Info
|
*key | String
| |
*Content-Type | String
| Only “application/json”
|
Body
Name
| Type
| Info
|
*voice |
| |
*metadata | JSON
|
|
*instruments | List
| program, must be “vocal_leadsheet”
notes, list, must, can be empty list
chordsChange, leave it empty
controlChanges, optional
|
*audioConfig | JSON
| sampleRate : 音檔的取樣率,僅支援 44.1K
encoding : base64的編碼格式,可為“WAV”或”MP3”。
|
|
Response
|
處理狀態查詢
提交音頻文件進行處理後,“狀態”鍵將從“待處理”變為“處理中”,最後變為“完成”。 如果出現問題,就會進入“錯誤”。 您可以發出 GET 請求,如下所示,以檢查轉錄狀態的更新。
您必須重複 GET 請求,直到您的狀態為“完成”或“錯誤”。 一旦狀態鍵顯示為“已完成”,您就可以從 path 拿到新的連結,並且可以直接下載檔案。
Request
URL: /vocal?page=1&perPage=10&status=pending
Method: GET
Header
Name
| Type
| Info
|
*key | String
| Bearer {key}
|
Query parameter
Name
| Info
|
page
| number
|
perPage
| number
|
status
| pending, ongoing, completed, error. if no value, get all list
|
Response
|
取得音檔結果
只要你的音檔狀態是 completed,你即可從以下 path 中取得處理後的音檔連結,並進行下載。
請注意,一但音檔完成後,因為安全問題,檔案只會保留 24 小時,超過就漚會自動刪除。
Request
URL: /vocal/{vocal_id}
Method: GET
Header
Name
| Type
| Info
|
*key | String
| Bearer {key}
|
Query parameter
Name
| Info
|
vocal_id
| string, uid.
|
Response
|