🪙 Hello, I am developing a subtitles generation plugin for Adobe Premiere relying on the Deepgram JS SDK (proxy and client). Since transcribing a video mp3 file's speech to text can take some time, I would like to allow my plugin end-users to cancel a Deepgram "listen"' request if they change their mind during the process. This would be done in JS using a custom fetch(), the .signal attribute and an AbortController; an ongoing PR to the JS SDK allows this on github.com (https://github.com/deepgram/deepgram-js-sdk/pull/245) . My deeper question is: When does Deepgram start to debit the project's balance? When is it too late to cancel a request? Note: I am using the v1/listen endpoint using the binary file upload method, not the remote URL method.
#About balance debiting time when cancelling Deepgram JS SDK fetch requests
1 messages · Page 1 of 1 (latest)
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_idif 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.
I believe an abort signal might not stop the audio generation, it would just orphan the data. I will double check for you though
I have made a promise to review and merge an experimental config for custom fetch early next week 🤞
But, I probably should also be exposing the abort from the built-in fetch. I will make a note
Hi @candid vault , thank you for understanding the need completely.
For now in my plugin, I will just prompt the user to confirm whether he/she is OK to possibly loose the committed credit for this job.
Regarding the PR, for my case, being able to pass a "signal" option to the default fetch would be simpler than passing a custom fetch. But I can use whatever possibility ends up in the main Git tree.
Almost certainly I'll arrange for the PR to get merged first and then think about a permanent solution to AbortSignal and a custom fetch solution sooner
Perfect, a custom fetch injection ability will already be great and sufficient for me.
Btw, if you guys at Deepgram were curious to see our early version of the Premiere plugin working with the Deepgram Whisper & Deepgram models, we can show that to you. I would like to have it released by the end of April, but we can already demonstrate.