mkozak commited on
Commit
e6dcb8a
·
unverified ·
1 Parent(s): 629adbe

try to save into /tmp/

Browse files
Files changed (1) hide show
  1. main.py +2 -2
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