meraj12 commited on
Commit
20c5eb3
·
verified ·
1 Parent(s): 674bd76

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -24,7 +24,7 @@ def transcribe_audio(audio_path, language="English"):
24
  result = model.transcribe(audio_path, language=language.lower())
25
  return result['text']
26
 
27
- def save_audio_file(uploaded_file, filename):
28
  """
29
  Save uploaded audio to a file.
30
  """
@@ -40,4 +40,4 @@ def save_chat_history(history, filename="chat_history.json"):
40
  """
41
  os.makedirs("history", exist_ok=True)
42
  with open(os.path.join("history", filename), "w") as f:
43
- json.dump(history, f, indent=4)
 
24
  result = model.transcribe(audio_path, language=language.lower())
25
  return result['text']
26
 
27
+ def save_uploaded_audio(uploaded_file, filename):
28
  """
29
  Save uploaded audio to a file.
30
  """
 
40
  """
41
  os.makedirs("history", exist_ok=True)
42
  with open(os.path.join("history", filename), "w") as f:
43
+ json.dump(history, f, indent=4)