Skip to content
Search docs

Transcribe and export ABC and MIDI

Submit original short music to SheetSage2. Get parseable ABC and readable MIDI through Runtime APIs, without opening ComfyUI Canvas.

First save the Doctor receipt and launch Runtime. Run from a second terminal at the repository root. The current GPU resource owner must run this command with an empty Runtime queue.

Use exactly the same port as Doctor, receipt saving, and launch. All four complete examples default to 8188. If you selected 8189, run & ./runtime/comfyui/examples/transcribe.ps1 -Port 8189. The script passes that port as the transcription CLI’s --base-url and does not fall back to the default address.

Use this complete example in your own prepared environment.

Terminal window
param([ValidateRange(1, 65535)][int]$Port = 8188)
# Run from the repository root in a second terminal. The GPU owner must use an empty queue.
uv run --project runtime/comfyui --no-sync python runtime/comfyui/p0/transcribe.py --readiness-report data/runtime-readiness.json --output-dir data/p0/transcription/run-01 --base-url "http://127.0.0.1:$Port"
if ($LASTEXITCODE -ne 0) { throw "Transcription did not succeed. Retain the request and receipt; inspect the result before retrying." }

Complete example: runtime/comfyui/examples/transcribe.ps1 ↗

The output directory must be new or empty. By default, the tool generates original 16-second, 48 kHz, stereo, 16-bit PCM instrumental audio. The input uses CC0-1.0.

This command uploads audio, submits GPU inference, and writes files. The documentation's copy button only copies the command. It does not run it.

Success exits 0. Open the output directory and check status=completed and verified=true in receipt.json.

FilePurpose
reference.wavDefault fixed input and content hash.
request.json / history.jsonSubmitted request and complete Runtime result.
score.abc / score.midArtifacts validated by complete parsing, MIDI export, and nonempty note readback.
receipt.jsonInput/output hashes, revisions, settings, and parser evidence.

The tool parses complete ABC, exports MIDI, uploads it again, and reads its notes. HTTP 200 or a file alone cannot mean success.

If the command exits 2 because the output directory is not empty, retain the existing results and choose a new directory. Do not delete old evidence to resubmit.

If the default 1800-second timeout expires, the request may still be running. Check its saved request, history, and queue first. The owner decides whether to wait or cancel.

The fixed short instrumental sample validates the pipeline and file validity. It does not establish accuracy for vocals or arbitrary music. SheetSage2 weights use CC-BY-NC-4.0, recorded separately from the input's CC0 license.

Diagnostic input accepts only nonsilent, untruncated 16-bit mono/stereo PCM WAV lasting 0.05–30 seconds. This input budget is not an accuracy guarantee.

Repeating identical audio can hit the plugin's independent cache. Public history alone cannot prove fresh GPU inference. The owner retains first-execution logs and GPU facts.

This tool verifies one Runtime path and keeps p0_passed=false. Full P0 acceptance also covers generation, queueing, cancellation, continuous Jobs, and cleanup.

Source version: 1ce3268Page source: docs/learn/transcribe.en.md