Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def resample(file_path):
|
|
42 |
|
43 |
|
44 |
def tran_script(file_path):
|
45 |
-
if
|
46 |
speech = resample(file_path)
|
47 |
inputs = processor(speech, sampling_rate=16_000,
|
48 |
return_tensors="pt", padding=True)
|
|
|
42 |
|
43 |
|
44 |
def tran_script(file_path):
|
45 |
+
if isinstance(file_path, str):
|
46 |
speech = resample(file_path)
|
47 |
inputs = processor(speech, sampling_rate=16_000,
|
48 |
return_tensors="pt", padding=True)
|