Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def transcribe():
|
|
72 |
return jsonify({"error": "No speech detected. Please try again."}), 400
|
73 |
|
74 |
result = asr_model(output_audio_path, generate_kwargs={"language": "en"})
|
75 |
-
transcribed_text = result["text"].strip()
|
76 |
|
77 |
return jsonify({"text": transcribed_text})
|
78 |
except Exception as e:
|
@@ -80,4 +80,3 @@ def transcribe():
|
|
80 |
|
81 |
if __name__ == "__main__":
|
82 |
serve(app, host="0.0.0.0", port=7860)
|
83 |
-
|
|
|
72 |
return jsonify({"error": "No speech detected. Please try again."}), 400
|
73 |
|
74 |
result = asr_model(output_audio_path, generate_kwargs={"language": "en"})
|
75 |
+
transcribed_text = result["text"].strip().replace(" ", "")
|
76 |
|
77 |
return jsonify({"text": transcribed_text})
|
78 |
except Exception as e:
|
|
|
80 |
|
81 |
if __name__ == "__main__":
|
82 |
serve(app, host="0.0.0.0", port=7860)
|
|