Hi, i am trying to transcribe some files and have been encountering a write operation time out error. I've looked for anything pertaining but can't seem to find why this is happening. I dont have a response_id because its not executing. This code ran fine 2 days ago so idk,
The code I am using is
'''
try:
print('go')
# Assuming DeepgramClient and related objects are properly defined
deepgram = DeepgramClient(DEEPGRAM_API_KEY)
with open(audio_url, "rb") as file:
buffer_data = file.read()
payload: FileSource = {
"buffer": buffer_data,
}
options = PrerecordedOptions(
model="nova-2",
smart_format=True,
)
print('calling')
response = deepgram.listen.prerecorded.v("1").transcribe_file(payload, options)
print('response aqcuired')
# Generate a filename with a timestamp
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
filename = f"/Users/uflo/Documents/uflo/new_els/transcription_result_{timestamp}.json"
# Save the JSON response to a file
with open(filename, 'w') as json_file:
json.dump(response.to_json(), json_file, indent=4)
print(f"Transcription saved to {filename}")
except Exception as e:
print(f"Exception type: {e.__class__.__name__}, Message: {e}")