Spaces:
Sleeping
Sleeping
try to save into /tmp/
Browse files
main.py
CHANGED
@@ -13,7 +13,7 @@ app = FastAPI()
|
|
13 |
|
14 |
def process_audio(url: str):
|
15 |
response = requests.get(url)
|
16 |
-
with open("audio.mp3", mode="wb") as file:
|
17 |
file.write(response.content)
|
18 |
|
19 |
|
@@ -39,7 +39,7 @@ def process_audio(url: str):
|
|
39 |
device=device
|
40 |
)
|
41 |
dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
|
42 |
-
whisper_result = pipe("audio.mp3")
|
43 |
return whisper_result
|
44 |
|
45 |
|
|
|
13 |
|
14 |
def process_audio(url: str):
|
15 |
response = requests.get(url)
|
16 |
+
with open("/tmp/audio.mp3", mode="wb") as file:
|
17 |
file.write(response.content)
|
18 |
|
19 |
|
|
|
39 |
device=device
|
40 |
)
|
41 |
dataset = load_dataset("distil-whisper/librispeech_long", "clean", split="validation")
|
42 |
+
whisper_result = pipe("/tmp/audio.mp3")
|
43 |
return whisper_result
|
44 |
|
45 |
|