antony66 commited on
Commit
58c0afd
1 Parent(s): 67687c3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -1
README.md CHANGED
@@ -56,7 +56,14 @@ asr_pipeline = pipeline(
56
  device=device,
57
  )
58
 
59
- # read your wav file into variable wav
 
 
 
 
 
 
 
60
  asr = asr_pipeline(wav, generate_kwargs={"language": "russian", "max_new_tokens": 256}, return_timestamps=False)
61
 
62
  print(asr['text'])
 
56
  device=device,
57
  )
58
 
59
+ # read your wav file into variable wav. For example:
60
+ from io import BufferIO
61
+ wav = BytesIO()
62
+ with open('call.wav', 'rb') as f:
63
+ wav.write(f.read())
64
+ wav.seek(0)
65
+
66
+ # get the transcription
67
  asr = asr_pipeline(wav, generate_kwargs={"language": "russian", "max_new_tokens": 256}, return_timestamps=False)
68
 
69
  print(asr['text'])