deepgram / deepgram-js-sdk

Official JavaScript SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
127 stars 45 forks source link

REMOTE_CONTENT_ERROR: The remote server hosting the media failed to return valid data #263

Closed onosendi closed 2 months ago

onosendi commented 2 months ago

I'm getting the error given in the title with the code shown below. This error occurs using the same URL, and happens every once and a while. So in other words, sometimes it works, sometimes it doesn't. There is nothing wrong with the remote URL either. Any ideas?

const deepgram = createClient(config.deepgram.api_key);

async function send_deepgram_request(url) {
    const options = {
        model: 'nova-2-phonecall',
        summarize: 'v2',
        diarize: true,
        redact: 'pci',
        smart_format: true,
        numerals: true,
    };

    const { result, error } = await deepgram
        .listen
        .prerecorded
        .transcribeUrlCallback(
            { url },
            new CallbackUrl(config.deepgram.webhook),
            options,
        );

    return { result, error };
}
lukeocodes commented 2 months ago

Closing as this is an API issue. If you'd like to raise a message on the community discord, or github discussion forum, you may find an explanation.

This is usually related to external factors though, like the speed of the host's internet, any outages in the middle, etc. Rarely do we have this issue on our service, as it would impact a lot of customers for our internet to be slow.