Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,11 +41,12 @@ def transcribe_the_command(audio,id):
|
|
41 |
file_name = "recorded_audio.wav"
|
42 |
sf.write(file_name, audio_data, sample_rate)
|
43 |
# Convert stereo to mono by averaging the two channels
|
44 |
-
print(
|
45 |
|
46 |
transcript = asr_pipe(file_name)["text"]
|
47 |
if id == "transcript_only":
|
48 |
reply=transcript
|
|
|
49 |
else:
|
50 |
most_similar_command,reply = find_most_similar_command(transcript, commands)
|
51 |
print(f"Given Statement: {transcript}")
|
|
|
41 |
file_name = "recorded_audio.wav"
|
42 |
sf.write(file_name, audio_data, sample_rate)
|
43 |
# Convert stereo to mono by averaging the two channels
|
44 |
+
print(id)
|
45 |
|
46 |
transcript = asr_pipe(file_name)["text"]
|
47 |
if id == "transcript_only":
|
48 |
reply=transcript
|
49 |
+
print(reply)
|
50 |
else:
|
51 |
most_similar_command,reply = find_most_similar_command(transcript, commands)
|
52 |
print(f"Given Statement: {transcript}")
|