Skip to content

Conversation

@edelabar
Copy link
Contributor

Not sure if this is useful to anyone else, but something I needed, so it's yours if you want it. Thanks for this project in general, it's been a pleasure to use!

@m1guelpf
Copy link
Owner

m1guelpf commented Apr 9, 2025

Cherry-picked some basic improvements from here. Some questions on the rest of the PR:

  • Would love to hear more about why you want a local ID for the Conversation
  • Same for the responses stream
  • In audioInterrumpted you mention "If you stop handling voice here you won't get the interrupt ended event.". Does that mean the audio gets interrupted but then never resumes?
  • In the AudioInterruptHandlerDelegate, are there any specific reasons for using an OSAllocatedUnfairLock instead of an actor?

@eric-humane
Copy link
Contributor

eric-humane commented Apr 27, 2025

Cherry-picked some basic improvements from here. Some questions on the rest of the PR:

  • Would love to hear more about why you want a local ID for the Conversation

prediction: offline storage and optimistic ui (prob could use like swift data and need stable id)

  • Same for the responses stream

same as above, prob incase openai ever changes id formats (they have)

  • In audioInterrumpted you mention "If you stop handling voice here you won't get the interrupt ended event.". Does that mean the audio gets interrupted but then never resumes?

prob this: https://developer.apple.com/documentation/avfaudio/handling-audio-interruptions

so you can:

  1. Pause the player / suspend IO; do not call engine.stop().
  2. Wait for the .ended case, then resume and, if necessary, reinstate the AVAudioSession category.

currently just tears everything down

  • In the AudioInterruptHandlerDelegate, are there any specific reasons for using an OSAllocatedUnfairLock instead of an actor?

back pressure and latency. this is basically "free".

Apple Developer Documentation
Observe audio session notifications to ensure that your app responds appropriately to interruptions.

@m1guelpf
Copy link
Owner

m1guelpf commented Sep 1, 2025

See #46 for a rewrite of this library to better accommodate WebRTC, which includes support for the speed API parameter.

@m1guelpf m1guelpf closed this Sep 1, 2025
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.

3 participants