ParthBhuptani commited on
Commit
bb8f2e3
·
verified ·
1 Parent(s): 79911c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -11
app.py CHANGED
@@ -71,20 +71,12 @@ No markdown, no bullet points. Just the reply text."""
71
  return f"❌ Error: {str(e)}\n\nMake sure HF_TOKEN is set in your Space secrets."
72
 
73
  def transcribe_audio(audio_path):
74
- print("Audio Path:", audio_path)
75
 
76
  if audio_path is None:
77
- return ""
78
 
79
- try:
80
- result = speech_client.automatic_speech_recognition(audio_path)
81
- print("Result:", result)
82
-
83
- return result.text if hasattr(result, "text") else str(result)
84
-
85
- except Exception as e:
86
- print("VOICE ERROR:", repr(e))
87
- return f"Voice transcription failed: {repr(e)}"
88
 
89
  # ── CSS ──────────────────────────────────────────────────────────────────────
90
  css = """
 
71
  return f"❌ Error: {str(e)}\n\nMake sure HF_TOKEN is set in your Space secrets."
72
 
73
  def transcribe_audio(audio_path):
74
+ print("Audio received:", audio_path)
75
 
76
  if audio_path is None:
77
+ return "No audio received"
78
 
79
+ return f"Audio file received: {audio_path}"
 
 
 
 
 
 
 
 
80
 
81
  # ── CSS ──────────────────────────────────────────────────────────────────────
82
  css = """