Skip to content

Feature request: upload audio for forced alignment #350

Description

@Geequlim

Currently forced alignment can be called through /v1/tasks/run, but the audio input is a server-side file path.

That works locally, but not well when audiocpp_server is running on another machine or in Docker, because the server cannot access the client's local audio file.

Would it be possible to add a multipart endpoint similar to /v1/audio/transcriptions?

For example:

POST /v1/audio/alignments
Content-Type: multipart/form-data

Fields:

file  = audio file
model = aligner model
text  = known transcript

Example:

curl http://localhost:8080/v1/audio/alignments \
  -F "file=@speech.wav" \
  -F "model=qwen3-align" \
  -F "text=The task has completed successfully."

The endpoint could return the existing word timestamp format.

My use case is TTS playback with synchronized text highlighting:

TTS → audio → forced aligner → word timestamps

The TTS and aligner may run locally or on a remote workstation, so uploading the audio directly would make the aligner much easier to use as a network service.

It looks like the multipart handling from /v1/audio/transcriptions might be reusable here.

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions