Comments (13)
yea, there isn't a timeout parameter in the transcription options class. it's on the function:
https://github.com/deepgram/deepgram-python-sdk/blob/main/deepgram/clients/abstract_sync_client.py#L91-L105
For transcribe_file
(URL is the same way):
myTimeout = httpx.Timeout(30.0, connect=10.0)
response = deepgram.listen.prerecorded.v("1").transcribe_file(payload, options, timeout=myTimeout)
from deepgram-python-sdk.
Hi @swethmandava ,
I've just tested this using the Python SDK and I didn't encounter a problem. Can you verify that you were using this Python SDK to make the request? I tested it using the prerecorded example file in the examples folder of this project.
from deepgram-python-sdk.
deepgram.transcription.prerecorded(
source,
options,
timeout = 300
)
Increasing timeout fixes the issue.
from deepgram-python-sdk.
even without timeout = 3000, it fails sometimes for videos of length < 1 hr. what do you recommend?
from deepgram-python-sdk.
@swethmandava timeouts can happen for a lot of reasons but it might all come down to the file size of what you are trying to send to us to transcribe.
so I'd recommend setting the timeout value to 300
seconds (5 minutes) when making a request to Deepgram.
Also I noticed you used our video
model which part of our Base tier, you can try a few different tier model combinations to see if it performs better. Our newest Nova models are the fastest, so I recommend trying that depending on the language needs of the file.
Here are some Docs that can help you determine a model:
https://developers.deepgram.com/docs/model
https://developers.deepgram.com/docs/models-overview
from deepgram-python-sdk.
I still get timeout errors occasionally. What's the recommended way to retry / upload large files without timeouts?
from deepgram-python-sdk.
I still get timeout errors occasionally. What's the recommended way to retry / upload large files without timeouts?
The best way of you are dealing with potential unstable internet connections would be to upload to some publicly accessible S3 bucket and use the transcription via URL method.
https://developers.deepgram.com/reference/pre-recorded
from deepgram-python-sdk.
I am trying to transcribe an mp3 on my computer of about 1 hour and a half and it keeps timing out. I trying using the parameter timeout = 300 but it said this was invalid syntax. Does anyone know how to fix this?
from deepgram-python-sdk.
I am trying to transcribe an mp3 on my computer of about 1 hour and a half and it keeps timing out. I trying using the parameter timeout = 300 but it said this was invalid syntax. Does anyone know how to fix this?
@JoelLederman It's probably because the syntax is invalid (the parameter you are using is not valid). Can you post your code OR how you are calling the function with the parameter declarations here?
from deepgram-python-sdk.
This is the part of the code that I specify timeout settings:
options = PrerecordedOptions(
model="nova",
smart_format=True,
summarize="v2",
diarize=True,
timeout = 300
)
from deepgram-python-sdk.
Ok that worked thanks so much!
Just one more question, the output I get is in this format: =2, speaker_confidence=0.7495117), Word(word='be', start=4066.395, end=4066.635, confidence=1.0, punctuated_word='be', speaker=2, speaker_confidence=0.7495117).
Is there any way to just get the transcription out as if I was using the API playground. I just want a transcription with speaker diarization as my output.
from deepgram-python-sdk.
I would understand how dot notation works. Here is an article:
https://builtin.com/data-science/dot-notation#:~:text=Dot%20Notation%20Explained,dot%5D%5Battribute%20or%20method%5D%20.
The structure for what the prerecorded result looks like is here:
https://github.com/deepgram/deepgram-python-sdk/blob/main/deepgram/clients/prerecorded/v1/response.py
The Prerecorded Object is VASTLY different from the Live Response object, but it might give you a clue on how you want to format your transcription and how to use the dot notation:
https://github.com/deepgram/deepgram-python-sdk/blob/main/examples/streaming/microphone/main.py#L34-L37
from deepgram-python-sdk.
Ok thanks so much you have been an amazing help!
from deepgram-python-sdk.
Related Issues (20)
- AsyncLive : server rejected websocket connection HOT 3
- Exception: 'LiveClient' object has no attribute 'keep_alive_thread' HOT 1
- Speaker confidence missing from PrerecordedResponse, and utterance confidence not set HOT 1
- Add `expiration_date` to CreateKey
- Remove `deepgram.listen`, `deepgram.manage|onprem`, etc Dot Notation
- Have Explicit and Distinct `DeepgramHttpClientOptions` and `DeepgramWsClientOptions`
- UtteranceEnd never triggers HOT 2
- [Automation] Markdown linting HOT 1
- [Automation] Yaml/Action Linting HOT 1
- [Automation] Shellscript Linting HOT 1
- [Automation] Python/Language Specific Static Checks and Lint HOT 1
- [Automation] Daily Build - Checks Against Real API
- [Automation] Unit Tests (Mock) - Checks Against Generated (But Real) Response Shapes
- Could not open socket: SpeechStarted HOT 6
- Diarization + Streaming HOT 1
- Inconsistency latency in real time STT with nova-2-phonecall HOT 3
- WebSocketException in LiveClient.start: timed out Failed to connect to Deepgram
- SpeechStarted gets triggered by background noise HOT 1
- WebSocketException in LiveClient.start: timed out Failed to connect to Deepgram HOT 4
- Rename "OnPrem" to "SelfHosted' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deepgram-python-sdk.