Skip to content

[draft] add is_end_of_turn for user transcription#1952

Open
longcw wants to merge 3 commits intomainfrom
longc/end-of-turn-flag
Open

[draft] add is_end_of_turn for user transcription#1952
longcw wants to merge 3 commits intomainfrom
longc/end-of-turn-flag

Conversation

@longcw
Copy link
Contributor

@longcw longcw commented Apr 10, 2025

This is a draft to see how to implement the is_end_of_turn flag for the transcription.
The current implementation only helps the case when using STT with EOU model.

@longcw longcw requested a review from a team April 10, 2025 03:41
self._session.emit(
"user_input_transcribed",
UserInputTranscribedEvent(transcript=ev.transcript, is_final=True),
UserInputTranscribedEvent(transcript=ev.transcript, is_final=True, is_end_of_turn=True),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the realtime API, I don't think _on_input_audio_transcription_completed is a reliable signal to trigger is_end_of_turn.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I didn't find a better signal, actually this is the only signal for OAI realtime API? The user transcription generation is async with the conversation items.

Base automatically changed from longc/transcription-segment-id to main April 14, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments