Found while fixing the streaming half of the same defect in #157, in code that shipped before this milestone.
_job_transcript joins audio_segments with a hard-coded separator, exactly as stt_stream did before #157's fix. In a language written without word separators — Japanese, Chinese, Thai — that inserts a space the Amazon Transcribe transcript does not contain, so a diarized transcript served from a job comes back different from the recording it transcribed.
#157 fixed the streaming path by carrying each run's true leading text from the transcript instead of assuming a space. The job path cannot reuse that fix directly: it needs the job result's item offsets rather than the segment texts it works from today, and the change reaches the non-streamed formatter too. That is why it was deliberately left out of #157 rather than widened into it.
Scope:
- Carry the transcript's own inter-segment text through the job-served diarized path.
- A test in a space-less language whose transcript is compared against the recording's, mirroring
test_a_speaker_change_inside_one_result_keeps_the_transcript_spacing, which is the test that caught the streaming case.
Ref: stdapi/models/audio/amazon_transcribe.py — _job_transcript, and _speaker_run / _TranscriptPart.lead for the shape the streaming fix uses.
Found while fixing the streaming half of the same defect in #157, in code that shipped before this milestone.
_job_transcriptjoinsaudio_segmentswith a hard-coded separator, exactly asstt_streamdid before #157's fix. In a language written without word separators — Japanese, Chinese, Thai — that inserts a space the Amazon Transcribe transcript does not contain, so a diarized transcript served from a job comes back different from the recording it transcribed.#157 fixed the streaming path by carrying each run's true leading text from the transcript instead of assuming a space. The job path cannot reuse that fix directly: it needs the job result's item offsets rather than the segment texts it works from today, and the change reaches the non-streamed formatter too. That is why it was deliberately left out of #157 rather than widened into it.
Scope:
test_a_speaker_change_inside_one_result_keeps_the_transcript_spacing, which is the test that caught the streaming case.Ref:
stdapi/models/audio/amazon_transcribe.py—_job_transcript, and_speaker_run/_TranscriptPart.leadfor the shape the streaming fix uses.