I am trying to read a voice and send it to Deepgram Live.
I tried recording the voice into a wav file, then reading the wav file for byte[] and pass that to Deepgram using the code below and this works.
var response = await deepgramClient.Transcription.Prerecorded.GetTranscriptionAsync(
new StreamSource(fileStream, "audio/wav"),
new PrerecordedTranscriptionOptions()
{
Punctuate = true,
Utterances = true,
Diarize = true,
Summarize = true,
DetectLanguage = true,
});
var srtTranscript = response.Results.Channels.First().Alternatives.First().Transcript;
However, if I directly send the byte [] created from voice input to the above code (not reading from a file) I get a bad request.
I also tried the SendData method available here https://github.com/deepgram/deepgram-dotnet-sdk/blob/main/examples/streaming/Program.cs It's still not working.
Appreciate some help on this please.