Skip to content

A customer reported that it's not possible to set the HTTP Timeout at all now. #127

@lukeocodes

Description

@lukeocodes
          A customer reported that it's not possible to set the HTTP Timeout at all now.

When they try to set it to 300 it times out at 100

The timeout should be set as 300 seconds as per the following code and I believe I can confirm the timeout by printing it out to the log:

deepgram.SetHttpClientTimeout(TimeSpan.FromSeconds(ApiRequestTimeoutInSeconds));

_logger.LogInformation($"ApiRequestTimeoutInSeconds: {ApiRequestTimeoutInSeconds.ToString()}");

And the output from the log file:

2023-08-30 07:32:18.818 +10:00 [INF] BinConsulting.TOPS.TOPService.AsrWorker: ApiRequestTimeoutInSeconds: 300

Error:

Error while transcribing audio files: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
DeepgramClient deepgram =
    new DeepgramClient(
        new Credentials(
            ApiKey,
            ApiUrl,
            ApiUrlRequiresSsl));
deepgram.SetHttpClientTimeout(TimeSpan.FromSeconds(300));
transcript = await deepgram.Transcription.Prerecorded.GetTranscriptionAsync(
            new StreamSource(stream, "audio/mpeg"), 
            new PrerecordedTranscriptionOptions() 
            {
                Tier = "enhanced",
                //Model = "meeting",
                Version = "latest",
                Language = "en",
                Diarize = options.EnableSpeakerSeparation,
                NamedEntityRecognition = true,
                Numerals = true,
                Punctuate = true,
                Utterances = true,
            });

Originally posted by @DamienDeepgram in #116 (comment)

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions