Harveenchadha
commited on
Commit
•
785e129
1
Parent(s):
6b8cfb9
Update app.py
Browse files
app.py
CHANGED
@@ -21,9 +21,11 @@ def read_file(wav):
|
|
21 |
|
22 |
|
23 |
def parse_transcription(wav_file):
|
24 |
-
'''
|
|
|
25 |
convert(wav_file.name, filename + "16k.wav")
|
26 |
speech, _ = sf.read(filename + "16k.wav")
|
|
|
27 |
'''
|
28 |
speech = read_file(wav_file)
|
29 |
input_values = processor(speech, sampling_rate=16_000, return_tensors="pt").input_values
|
|
|
21 |
|
22 |
|
23 |
def parse_transcription(wav_file):
|
24 |
+
'''
|
25 |
+
filename = wav_file.name.split('.')[0]
|
26 |
convert(wav_file.name, filename + "16k.wav")
|
27 |
speech, _ = sf.read(filename + "16k.wav")
|
28 |
+
|
29 |
'''
|
30 |
speech = read_file(wav_file)
|
31 |
input_values = processor(speech, sampling_rate=16_000, return_tensors="pt").input_values
|