Docs
Get an API key

Stream Music Timestamps

GET /v1/music/{id}/timestamps/stream View .md

The words of a song as it renders: the job's timestamps_stream_url, there for a song asked for with timestamps: true while it is pending or in_progress on a model that streams (streaming.progressive: true). Server-sent events, each a JSON data line:

  • line: one lyric line, {line, words}, in the shape of outputs[].timestamps lines[] and words[], once two timings of the audio so far agree where it starts, both heard it clearly, and every line before it has been sent. Each line is sent once, in order. The song renders faster than it plays, so after the opening lines they arrive ahead of the listener. A song whose words cannot be placed while it renders (a first line no timing hears clearly) sends none, and its timing comes with done.
  • done: {timestamps}, the finished song's timing, the timestamps its output carries once the job completes. It replaces the lines sent before it, which it may have moved by a fraction of a second, and ends the stream.
  • error: {error: {code, message}}, code timestamps_unavailable: the lyrics could not be timed, or the song failed or was cancelled. It ends the stream.

A comment (: ping) is sent on a quiet stream. A listener who connects late, even just after the job completed, gets every event from the start: the stream is kept for 10 minutes after it ends. If the job is retried after a server failure the stream starts over and a listener partway through is let go; connect again. Following the words costs nothing beyond the song's timestamps. Send your API key.

  • id string required

    The music job's ID, music_ followed by 24 hex characters.

  • index integer

    The output, as outputs[] will number it.

    default 0at least 0

The song's lines as they settle, then its finished timing

text/event-stream

curl https://api.vultrinference.com/v1/music/{id}/timestamps/stream \
  -H "Authorization: Bearer $VULTR_INFERENCE_API_KEY"