Skip to content

fix: emit audio_start event when audio begins #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vrtnis
Copy link
Contributor

@vrtnis vrtnis commented Jul 19, 2025

Fixes a bug where RealtimeSession did not emit the audio_start event, despite it being defined in the type system.

Changes

  • Emit audio_start once per turn when the first audio chunk arrives

  • Reset internal #audioStarted flag on:

    • turn_started
    • audio_done
    • audio_interrupted
  • Added test to verify audio_start fires once per turn

  • Aligns behavior with existing type definitions and verified with pnpm build,test,lint

Resolves #235

Copy link

changeset-bot bot commented Jul 19, 2025

🦋 Changeset detected

Latest commit: e4c18cb

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@openai/agents-realtime Patch
@openai/agents Patch
@openai/agents-extensions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@seratch seratch requested a review from dkundel-openai July 21, 2025 23:54
@seratch seratch added bug Something isn't working and removed enhancement New feature or request labels Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package:agents-realtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

audio_start is not called when audio is started
2 participants