Skip to content

Now open source · Learn more

DocsStart the microphone, or stop it and transcribe

Start the microphone, or stop it and transcribe

POSThttp://127.0.0.1:{port}/recording/toggle

Send Authorization: Bearer <token>, with the token from the discovery file. See the Local API overview for the port, the token and the response envelope.

Works on Linux only. macOS does not serve this path. Windows answers it with ok: false and the code ENGINE_UNAVAILABLE. The route takes no request body and no mode_id, so it uses the current Mode.

When the recorder is idle, the call starts it. When the recorder is recording, the call stops it and transcribes, and it waits for that transcription — so it is as slow as a /transcribe call.

A call during the stopping or the transcribing state is refused with HTTP 400 and the code INVALID_REQUEST, because a transcription is already in progress.

Responses

200 Recorder state after the toggle

application/json, RecordingStateResponse

  • okboolean

  • recordingRecordingState

    State of the live recorder. Linux only.

    • is_recordingboolean

      True for the recording state only.

    • statestring

      one of "idle", "recording", "stopping", "transcribing", "retrying", "completed", "cancelled", "failed"

400 A transcription is already in progress

application/json, ErrorEnvelope

  • okbooleanrequired

    one of false

  • errorobjectrequired

    • codestringrequired

      one of "MODEL_NOT_INSTALLED", "MODEL_NOT_FOUND", "ENGINE_UNAVAILABLE", "MISSING_API_KEY", "FILE_NOT_FOUND", "FILE_ACCESS_DENIED", "FILE_NOT_ALLOWED", "AUDIO_DECODE_FAILED", "TRANSCRIPTION_FAILED", "MODE_NOT_FOUND", "MODE_NAME_TAKEN", "INVALID_REQUEST", "RATE_LIMITED", "TIMEOUT"

    • messagestringrequired

    • hintstring

The whole spec is openapi.yaml.