Boadiwaa commited on
Commit
d8c2a3a
·
verified ·
1 Parent(s): 67f706f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -33,14 +33,13 @@ def transcribe(data):
33
  #data_dict=ast.literal_eval(data)
34
  #data_list= data["data"]
35
  #url = data_list[0]
36
- audio_string = data[0]#url["url"]
37
- return(audio_string)
38
- #decode_string = base64.b64decode(audio_string)
39
  #array = np.frombuffer(decode_string, dtype=np.uint8)
40
- #output_file_path = "audio.wav"
41
- #with open(output_file_path, "wb") as output_file:
42
- #output_file.write(decode_string)
43
-
44
  #with torch.cuda.amp.autocast():
45
  #data,samplerate = librosa.load(output_file_path)
46
  #text = pipe(output_file_path,max_new_tokens=255)["text"]
 
33
  #data_dict=ast.literal_eval(data)
34
  #data_list= data["data"]
35
  #url = data_list[0]
36
+ #url["url"]
37
+ decode_string = base64.b64decode(data)
 
38
  #array = np.frombuffer(decode_string, dtype=np.uint8)
39
+ output_file_path = "audio.wav"
40
+ with open(output_file_path, "wb") as output_file:
41
+ output_file.write(decode_string)
42
+ return "Success"
43
  #with torch.cuda.amp.autocast():
44
  #data,samplerate = librosa.load(output_file_path)
45
  #text = pipe(output_file_path,max_new_tokens=255)["text"]