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

Can't get the Audio Transcription to work in Unity C# #102

Open
chiddyBenno opened this issue Jul 1, 2024 · 0 comments
Open

Can't get the Audio Transcription to work in Unity C# #102

chiddyBenno opened this issue Jul 1, 2024 · 0 comments

Comments

@chiddyBenno
Copy link

Hello dear openai-dotnet Community.
Im currently working on a OpenAI integration in my VR-Unity Project.
I was previously working with Azure SST & TTS and want to change it all to the OpenAI-API.

Even trying out the simple Example:
`public async Task Example02_SimpleTranscriptionAsync()
{
AudioClient client = new("whisper-1", Environment.GetEnvironmentVariable("OPENAI_API_KEY"));

    string audioFilePath = Path.Combine("Assets", "audio_houseplant_care.mp3");

    AudioTranscription transcription = await client.TranscribeAudioAsync(audioFilePath);

    Console.WriteLine($"{transcription.Text}");
}`

it will give me this error:

Error: boundary
UnityEngine.Debug:Log (object)
SpeechToTextManager/<Example02_SimpleTranscriptionAsync>d__14:MoveNext () (at Assets/02-KiChatGPT/SpeechToTextManager.cs:70)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder:Start<SpeechToTextManager/<Example02_SimpleTranscriptionAsync>d__14> (SpeechToTextManager/<Example02_SimpleTranscriptionAsync>d__14&)
SpeechToTextManager:Example02_SimpleTranscriptionAsync ()
SpeechToTextManager:StartSpeechToText () (at Assets/02-KiChatGPT/SpeechToTextManager.cs:47)
NewOpenAIController:Start () (at Assets/02-KiChatGPT/NewOpenAIController.cs:57)

I would be very grateful if somebody could help me with it.
Greetings,
Benjamin

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

No branches or pull requests

1 participant