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

Unable to use sdk to transcribe using OpenAI whisper #28145

Closed
abramovi opened this issue Jan 3, 2024 · 4 comments
Closed

Unable to use sdk to transcribe using OpenAI whisper #28145

abramovi opened this issue Jan 3, 2024 · 4 comments
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. OpenAI

Comments

@abramovi
Copy link

abramovi commented Jan 3, 2024

  • Package Name:
    "@azure/openai"
  • Package Version:
    1.0.0-beta.8
  • Operating system:
    macos
  • nodejs
    v20.8.1

Describe the bug
A clear and concise description of what the bug is.
running getAudioTranscription is not working. I ran the exact example from here and it failed with the following error:

The sample encountered an error: TypeError: Cannot read properties of undefined (reading 'name')

To Reproduce
Steps to reproduce the behavior:

  1. run the audioTranscription.ts example

Expected behavior
working transcription

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 3, 2024
@minhanh-phan
Copy link
Member

Thank you @abramovi for raising this issue. We have been able to reproduce it and we are working on a fix soon. For the time being, please add your desired output response in this line to run the sample. The supported response format values are "json", "verbose_json", "srt", "vtt", and "text".

  const result = await client.getAudioTranscription(deploymentName, audio, "json");

@deyaaeldeen deyaaeldeen added bug This issue requires a change to an existing behavior in the product in order to be resolved. OpenAI and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jan 3, 2024
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jan 3, 2024
deyaaeldeen added a commit that referenced this issue Jan 3, 2024
### Packages impacted by this PR
@azure/openai & @azure/core-rest-pipeline

### Issues associated with this PR
#28145

### Describe the problem that is addressed by this PR

The `responseFormat` parameter is included in a form data request. If
the customer does not specify it, the parameter is added to the form
data request with a value of undefined. However, the form data policy
attempts to treat this value as a File object.

### What are the possible designs available to address the problem? If
there are more than one possible design, why was the one in this PR
chosen?

To avoid sending an incorrect parameter, the fix is to not send it if it
is not set by the customer. Additionally, the core should verify that
the form data value is defined and is an object before proceeding to
treat it as such.

### Are there test cases added in this PR? _(If not, why?)_
Yes

### Provide a list of related PRs _(if any)_
N/A

### Command used to generate this PR:**_(Applicable only to SDK release
request PRs)_

### Checklists
- [x] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so,
create an Issue in the
[Autorest/typescript](https://github.com/Azure/autorest.typescript)
repository and link it here)_
- [x] Added a changelog (if necessary)
@deyaaeldeen
Copy link
Member

v1.0.0-beta.10 has been released and it contains a fix to this issue. Please let us know if you have any other feedback!

@deyaaeldeen deyaaeldeen added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Jan 3, 2024
Copy link

github-actions bot commented Jan 3, 2024

Hi @abramovi. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

Copy link

Hi @abramovi, since you haven’t asked that we /unresolve the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve to reopen the issue.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. OpenAI
Projects
None yet
Development

No branches or pull requests

3 participants