Skip to content

Commit d86c5f5

Browse files
|Ankit, Umair, Anirudh| fix chunk file
1 parent f859e71 commit d86c5f5

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ parameters:
77
default: speech_recognition_model_api
88
package_version:
99
type: string
10-
default: "3.2.35"
10+
default: "3.2.36"
1111
dependency_image_name:
1212
type: string
1313
default: speech-recognition-open-api-dependency

src/lib/inference_lib.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,8 @@ def get_results(wav_path, dict_path, generator, use_cuda=False, w2v_path=None, m
377377
dir_name = src.media_convertor.media_conversion(wav_path, duration_limit=15)
378378
audio_file = dir_name / 'clipped_audio.wav'
379379

380-
start_time, end_time = extract_time_stamps(str(audio_file))
381-
original_file_path = wav_path.replace('clipped_audio_enhanced', 'clipped_audio')
382-
original_chunk = AudioSegment.from_wav(original_file_path)
380+
start_time, end_time = extract_time_stamps(audio_file)
381+
original_chunk = AudioSegment.from_wav(audio_file)
383382
silence = AudioSegment.silent(duration=500)
384383
chunked_audio = AudioSegment.silent(duration=500)
385384
for i in tqdm(range(len(start_time))):

src/srt/timestamp_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def vad_collector(sample_rate, frame_duration_ms,
132132
def extract_time_stamps(wav_file):
133133
start_time = []
134134
end_time = []
135-
audio, sample_rate = read_wave(wav_file)
135+
audio, sample_rate = read_wave(str(wav_file))
136136
vad = webrtcvad.Vad(3)
137137
frames = frame_generator(30, audio, sample_rate)
138138
frames = list(frames)

0 commit comments

Comments
 (0)