Spaces:
Running
Running
FutureWarning: The input name `inputs` is deprecated. Please make sure to use `input_features` instead.
Browse files- src/app.py +4 -4
src/app.py
CHANGED
@@ -260,12 +260,12 @@ def process_speech(audio_data, history):
|
|
260 |
# Transcribe with error handling
|
261 |
try:
|
262 |
# Format dictionary correctly with required keys
|
263 |
-
|
264 |
"raw": audio_array,
|
265 |
"sampling_rate": sample_rate
|
266 |
}
|
267 |
|
268 |
-
result = transcriber(
|
269 |
|
270 |
# Handle different result types
|
271 |
if isinstance(result, dict) and "text" in result:
|
@@ -528,10 +528,10 @@ with gr.Blocks(
|
|
528 |
sample_rate, audio_array = audio
|
529 |
|
530 |
# Process audio and get proper format
|
531 |
-
|
532 |
|
533 |
# Pass to transcriber
|
534 |
-
result = transcriber(
|
535 |
|
536 |
# Extract text from result
|
537 |
if isinstance(result, dict):
|
|
|
260 |
# Transcribe with error handling
|
261 |
try:
|
262 |
# Format dictionary correctly with required keys
|
263 |
+
input_features = {
|
264 |
"raw": audio_array,
|
265 |
"sampling_rate": sample_rate
|
266 |
}
|
267 |
|
268 |
+
result = transcriber(input_features)
|
269 |
|
270 |
# Handle different result types
|
271 |
if isinstance(result, dict) and "text" in result:
|
|
|
528 |
sample_rate, audio_array = audio
|
529 |
|
530 |
# Process audio and get proper format
|
531 |
+
input_features = prepare_audio_features(audio_array, sample_rate)
|
532 |
|
533 |
# Pass to transcriber
|
534 |
+
result = transcriber(input_features)
|
535 |
|
536 |
# Extract text from result
|
537 |
if isinstance(result, dict):
|