GoodML commited on
Commit
d53a07b
·
verified ·
1 Parent(s): 57a62f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -147,6 +147,12 @@ def transcribe_audio(wav_file_path):
147
  return {"status": "error", "message": f"Error extracting transcript: {e}"}
148
 
149
  print(f"Transcript obtained: {transcript}")
 
 
 
 
 
 
150
  return transcript
151
  else:
152
  return {"status": "error", "message": "Invalid response from Deepgram."}
 
147
  return {"status": "error", "message": f"Error extracting transcript: {e}"}
148
 
149
  print(f"Transcript obtained: {transcript}")
150
+ # Step: Save the transcript to a text file
151
+ transcript_file_path = "transcript_from_transcribe_audio.txt"
152
+ with open(transcript_file_path, "w", encoding="utf-8") as transcript_file:
153
+ transcript_file.write(transcript)
154
+ print(f"Transcript saved to file: {transcript_file_path}")
155
+
156
  return transcript
157
  else:
158
  return {"status": "error", "message": "Invalid response from Deepgram."}