Skip to content
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

SendAudioAsync does not set 'isSendingAudio' back to false #268

Open
onionhammer opened this issue Oct 27, 2024 · 6 comments · May be fixed by #269
Open

SendAudioAsync does not set 'isSendingAudio' back to false #268

onionhammer opened this issue Oct 27, 2024 · 6 comments · May be fixed by #269
Labels
bug Something isn't working

Comments

@onionhammer
Copy link

onionhammer commented Oct 27, 2024

Service

OpenAI

Describe the bug

public async Task SendAudioAsync(BinaryData audio, CancellationToken cancellationToken = default)

In the 'BinaryData' overload, subsequent calls will fail with exception since _isSendingAudio is not set back to false as it does in the memorystream overload

Steps to reproduce

This is appears to be a logical/code error

Code snippets

No response

OS

.NET version

.NET 8

Library version

2.1.0-*

@onionhammer
Copy link
Author

How is this still not fixed? Isn't there a failing test suite somewhere?

@onionhammer
Copy link
Author

onionhammer commented Jan 19, 2025

Bump. Although the code appears refactored, either this is still an issue or the dependent microsoft library hasn't been updated for it to work.

@joseharriaga
Copy link
Collaborator

Thank you for your contribution, @onionhammer ! Have you tried the latest stable 2.1.0 version from early December? I believe this issue is fixed in that one, but let me know if you're still seeing it.

Here's a link:
🔗 https://www.nuget.org/packages/OpenAI/2.1.0

@onionhammer
Copy link
Author

Looks like the issue is that the only (working) version of 'Azure.AI.OpenAI' is referencing the broken version of your nuget package.

@joseharriaga
Copy link
Collaborator

Ah, so this is an issue with the Azure OpenAI library (Azure.AI.OpenAI) rather than the OpenAI library? Got it. I think I see what the problem is now:

Azure OpenAI versions a little differently than OpenAI. In particular, a stable version of the Azure OpenAI service does not include beta APIs (such as the Realtime API). Since version 2.1.0 of the Azure OpenAI library is a stable version and targets the latest stable version of the Azure service, it does not include beta APIs either, and that is why the fix is missing there.

We're preparing to publish new 2.2.0-beta.1 versions of both libraries in a few days. This beta library of Azure OpenAI will target the beta versions of the service, and therefore it will once again include the Realtime APIs (along with this fix). I will post back here as soon as it is out.

@onionhammer
Copy link
Author

Ah that makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants