Saltar al contenido principal
POST
/
sing_frame_f0
Get frame-by-frame fundamental frequency from a score / singing voice synthesis query
curl --request POST \
  --url https://api.example.com/sing_frame_f0 \
  --header 'Content-Type: application/json' \
  --data '
{
  "score": {
    "notes": [
      {
        "frame_length": 123,
        "lyric": "<string>",
        "id": "<string>",
        "key": 123
      }
    ]
  },
  "frame_audio_query": {
    "f0": [
      123
    ],
    "volume": [
      123
    ],
    "phonemes": [
      {
        "phoneme": "<string>",
        "frame_length": 123,
        "note_id": "<string>"
      }
    ],
    "volumeScale": 123,
    "outputSamplingRate": 123,
    "outputStereo": true
  }
}
'
import requests

url = "https://api.example.com/sing_frame_f0"

payload = {
    "score": { "notes": [
            {
                "frame_length": 123,
                "lyric": "<string>",
                "id": "<string>",
                "key": 123
            }
        ] },
    "frame_audio_query": {
        "f0": [123],
        "volume": [123],
        "phonemes": [
            {
                "phoneme": "<string>",
                "frame_length": 123,
                "note_id": "<string>"
            }
        ],
        "volumeScale": 123,
        "outputSamplingRate": 123,
        "outputStereo": True
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    score: {notes: [{frame_length: 123, lyric: '<string>', id: '<string>', key: 123}]},
    frame_audio_query: {
      f0: [123],
      volume: [123],
      phonemes: [{phoneme: '<string>', frame_length: 123, note_id: '<string>'}],
      volumeScale: 123,
      outputSamplingRate: 123,
      outputStereo: true
    }
  })
};

fetch('https://api.example.com/sing_frame_f0', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.example.com/sing_frame_f0",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'score' => [
        'notes' => [
                [
                                'frame_length' => 123,
                                'lyric' => '<string>',
                                'id' => '<string>',
                                'key' => 123
                ]
        ]
    ],
    'frame_audio_query' => [
        'f0' => [
                123
        ],
        'volume' => [
                123
        ],
        'phonemes' => [
                [
                                'phoneme' => '<string>',
                                'frame_length' => 123,
                                'note_id' => '<string>'
                ]
        ],
        'volumeScale' => 123,
        'outputSamplingRate' => 123,
        'outputStereo' => true
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.example.com/sing_frame_f0"

	payload := strings.NewReader("{\n  \"score\": {\n    \"notes\": [\n      {\n        \"frame_length\": 123,\n        \"lyric\": \"<string>\",\n        \"id\": \"<string>\",\n        \"key\": 123\n      }\n    ]\n  },\n  \"frame_audio_query\": {\n    \"f0\": [\n      123\n    ],\n    \"volume\": [\n      123\n    ],\n    \"phonemes\": [\n      {\n        \"phoneme\": \"<string>\",\n        \"frame_length\": 123,\n        \"note_id\": \"<string>\"\n      }\n    ],\n    \"volumeScale\": 123,\n    \"outputSamplingRate\": 123,\n    \"outputStereo\": true\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/sing_frame_f0")
  .header("Content-Type", "application/json")
  .body("{\n  \"score\": {\n    \"notes\": [\n      {\n        \"frame_length\": 123,\n        \"lyric\": \"<string>\",\n        \"id\": \"<string>\",\n        \"key\": 123\n      }\n    ]\n  },\n  \"frame_audio_query\": {\n    \"f0\": [\n      123\n    ],\n    \"volume\": [\n      123\n    ],\n    \"phonemes\": [\n      {\n        \"phoneme\": \"<string>\",\n        \"frame_length\": 123,\n        \"note_id\": \"<string>\"\n      }\n    ],\n    \"volumeScale\": 123,\n    \"outputSamplingRate\": 123,\n    \"outputStereo\": true\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/sing_frame_f0")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"score\": {\n    \"notes\": [\n      {\n        \"frame_length\": 123,\n        \"lyric\": \"<string>\",\n        \"id\": \"<string>\",\n        \"key\": 123\n      }\n    ]\n  },\n  \"frame_audio_query\": {\n    \"f0\": [\n      123\n    ],\n    \"volume\": [\n      123\n    ],\n    \"phonemes\": [\n      {\n        \"phoneme\": \"<string>\",\n        \"frame_length\": 123,\n        \"note_id\": \"<string>\"\n      }\n    ],\n    \"volumeScale\": 123,\n    \"outputSamplingRate\": 123,\n    \"outputStereo\": true\n  }\n}"

response = http.request(request)
puts response.read_body
[
  123
]
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>",
      "input": "<unknown>",
      "ctx": {}
    }
  ]
}

Parámetros de consulta

speaker
integer
requerido
core_version
string

Cuerpo

application/json
score
Score · object
requerido

Score information.

frame_audio_query
FrameAudioQuery · object
requerido

Frame-by-frame query for speech synthesis.

Respuesta

Successful Response

Última modificación el 13 de julio de 2026