You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Speaker labels on POST /v1/transcribe
#1305
POST /v1/transcribe returns one unlabeled text string. FluidVoice already labels speakers in two other places, and a local client cannot reach either of them for an uploaded file:
FluidMeet labels speakers, and GET /v1/meetings/transcript can return those names, but only for a meeting FluidVoice recorded itself.
File transcription labels speakers when fileTranscriptionSpeakerLabelsEnabled is on (FileTranscriptionService.transcribeFileWithSpeakerLabels). InferenceAPIController does not call that path. It calls ASRService.transcribeFileForAPI, which returns text, confidence, sampleCount, and provider, and it ignores query parameters.
I upload audio from another local app (a WhatsApp client) to POST http://127.0.0.1:47733/v1/transcribe with a raw body and X-Filename. Voice notes are usually Ogg/Opus and are one speaker. Other files (m4a, mp3, wav, and so on) are often conversations. Those need the same speaker turns the file-transcription screen already produces. Turning the in-app setting on does not change this endpoint.
Proposed behavior
Accept an opt-in query on the existing route:
POST /v1/transcribe?speakerLabels=1
Please do not use a parameter named speakers. fileTranscriptionExpectedSpeakerCount is a count, so speakers=1 would read as "expect one speaker."
When speakerLabels=1 and diarization is supported for that file, run the same diarize-then-transcribe path as file transcription. This should be per request, not gated on the in-app toggle, so a client can ask for labels on one file and skip them on another.
Add the turns the file-transcription result already has:
speaker is the diarization label, or an enrolled name when FluidVoice has one. Omit speakerSegments when the query is absent.
If diarization is unavailable, finds no turns, or fails, keep today's success response: plain text, no speakerSegments, and no error. An optional speakerLabelingNotice (the field TranscriptionResult already stores) would explain the fallback without failing the transcript.
A client I maintain already sends speakerLabels=1 for every upload that is not an OggS file, and renders speakerSegments when at least two distinct speakers are present. One speaker, or a missing field, stays a plain transcript.
Alternatives considered
Reading GET /v1/meetings/transcript. That only covers FluidMeet recordings, not an uploaded file.
Relying on fileTranscriptionSpeakerLabelsEnabled. The local API never consults it, and a global toggle cannot express "label this file, not that one."
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
POST /v1/transcribereturns one unlabeledtextstring. FluidVoice already labels speakers in two other places, and a local client cannot reach either of them for an uploaded file:GET /v1/meetings/transcriptcan return those names, but only for a meeting FluidVoice recorded itself.fileTranscriptionSpeakerLabelsEnabledis on (FileTranscriptionService.transcribeFileWithSpeakerLabels).InferenceAPIControllerdoes not call that path. It callsASRService.transcribeFileForAPI, which returnstext,confidence,sampleCount, andprovider, and it ignores query parameters.I upload audio from another local app (a WhatsApp client) to
POST http://127.0.0.1:47733/v1/transcribewith a raw body andX-Filename. Voice notes are usually Ogg/Opus and are one speaker. Other files (m4a, mp3, wav, and so on) are often conversations. Those need the same speaker turns the file-transcription screen already produces. Turning the in-app setting on does not change this endpoint.Proposed behavior
Accept an opt-in query on the existing route:
POST /v1/transcribe?speakerLabels=1Please do not use a parameter named
speakers.fileTranscriptionExpectedSpeakerCountis a count, sospeakers=1would read as "expect one speaker."When
speakerLabels=1and diarization is supported for that file, run the same diarize-then-transcribe path as file transcription. This should be per request, not gated on the in-app toggle, so a client can ask for labels on one file and skip them on another.Add the turns the file-transcription result already has:
{ "text": "[0:12] Speaker 1: hello\n\n[0:40] Speaker 2: hi", "confidence": 0.9, "sampleCount": 160000, "provider": "Fluid Speech Mini", "speakerSegments": [ {"speaker": "Speaker 1", "startSeconds": 12.2, "endSeconds": 18.0, "text": "hello"}, {"speaker": "Speaker 2", "startSeconds": 40.0, "endSeconds": 44.0, "text": "hi"} ] }speakeris the diarization label, or an enrolled name when FluidVoice has one. OmitspeakerSegmentswhen the query is absent.If diarization is unavailable, finds no turns, or fails, keep today's success response: plain
text, nospeakerSegments, and no error. An optionalspeakerLabelingNotice(the fieldTranscriptionResultalready stores) would explain the fallback without failing the transcript.A client I maintain already sends
speakerLabels=1for every upload that is not anOggSfile, and rendersspeakerSegmentswhen at least two distinct speakers are present. One speaker, or a missing field, stays a plain transcript.Alternatives considered
GET /v1/meetings/transcript. That only covers FluidMeet recordings, not an uploaded file.fileTranscriptionSpeakerLabelsEnabled. The local API never consults it, and a global toggle cannot express "label this file, not that one."All reactions