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

Azure OpenAI: fix Whisper snippets (remove redundant BinaryData.FromStream) #39313

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix Azure OpenAI whisper snippets
trrwilson committed Oct 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 24eb5c49f688cb40a84ae243dcce939bf9b70fe5
2 changes: 0 additions & 2 deletions sdk/openai/Azure.AI.OpenAI/README.md
Original file line number Diff line number Diff line change
@@ -403,7 +403,6 @@ Uri imageUri = imageGenerations.Value.Data[0].Url;

```C# Snippet:TranscribeAudio
using Stream audioStreamFromFile = File.OpenRead("myAudioFile.mp3");
BinaryData audioFileData = BinaryData.FromStream(audioStreamFromFile);

var transcriptionOptions = new AudioTranscriptionOptions()
{
@@ -425,7 +424,6 @@ Console.WriteLine(transcription.Text);

```C# Snippet:TranslateAudio
using Stream audioStreamFromFile = File.OpenRead("mySpanishAudioFile.mp3");
BinaryData audioFileData = BinaryData.FromStream(audioStreamFromFile);

var translationOptions = new AudioTranslationOptions()
{
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@ public async Task TranscribeAudio()

#region Snippet:TranscribeAudio
using Stream audioStreamFromFile = File.OpenRead("myAudioFile.mp3");
BinaryData audioFileData = BinaryData.FromStream(audioStreamFromFile);

var transcriptionOptions = new AudioTranscriptionOptions()
{
Original file line number Diff line number Diff line change
@@ -20,7 +20,6 @@ public async Task TranslateAudio()

#region Snippet:TranslateAudio
using Stream audioStreamFromFile = File.OpenRead("mySpanishAudioFile.mp3");
BinaryData audioFileData = BinaryData.FromStream(audioStreamFromFile);

var translationOptions = new AudioTranslationOptions()
{