#I need some help with the .Net samples code.

1 messages · Page 1 of 1 (latest)

jaunty vessel
#

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.

GitHub

.NET SDK for Deepgram's automated speech recognition APIs. - deepgram/deepgram-dotnet-sdk

inland cradleBOT
#

Thanks for asking your question. Please be sure to reply with as much detail as possible so we can assist you efficiently. Such as:

  • Provide the request_id if you've a question about a transcription response.
  • The options you used or the api.deepgram.com URL you sent your request to, including parameters.
  • Any code snippets you can include.
  • Any audio you can include, or if you can't share it here please email it to us at [email protected] and provide a link to this thread.
tawdry linden
#

Hi @jaunty vessel

The code in main is going through extensive refactoring right now in preparation for the upcoming v4 release. You should consider everything there unstable. The libraries themselves compile and should work, but I believe the examples may have fallen behind. There are issues in the repo explaining those still need to be worked on.

If you are looking for something more stable, please look at the v3.4.1 code base and examples in the release-v3 branch.