Fix arguments order in pcm_to_np call
pcm_to_np takes segment buffer as its first argument and audio format as a second one. The wrong order cause "bytes object has no attribute 'channels'' ArgumentError.
This commit is contained in:
parent
64fd79f9c1
commit
8a87d1d100
@ -168,7 +168,7 @@ def split_audio_file(audio_path,
|
|||||||
segments = vad_split(frames, aggressiveness=aggressiveness)
|
segments = vad_split(frames, aggressiveness=aggressiveness)
|
||||||
for segment in segments:
|
for segment in segments:
|
||||||
segment_buffer, time_start, time_end = segment
|
segment_buffer, time_start, time_end = segment
|
||||||
samples = pcm_to_np(audio_format, segment_buffer)
|
samples = pcm_to_np(segment_buffer, audio_format)
|
||||||
yield time_start, time_end, samples
|
yield time_start, time_end, samples
|
||||||
|
|
||||||
def to_mfccs(time_start, time_end, samples):
|
def to_mfccs(time_start, time_end, samples):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user