Fix: colab stdout error, so replace with stdout wrapper
This commit is contained in:
5
slice.py
5
slice.py
@@ -1,12 +1,13 @@
|
||||
import argparse
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
|
||||
import soundfile as sf
|
||||
import torch
|
||||
from tqdm import tqdm
|
||||
|
||||
from tools.stdout_wrapper import get_stdout
|
||||
|
||||
vad_model, utils = torch.hub.load(
|
||||
repo_or_dir="snakers4/silero-vad",
|
||||
model="silero_vad",
|
||||
@@ -106,7 +107,7 @@ if __name__ == "__main__":
|
||||
shutil.rmtree(output_dir)
|
||||
|
||||
total_sec = 0
|
||||
for wav_file in tqdm(wav_files, file=sys.stdout):
|
||||
for wav_file in tqdm(wav_files, file=get_stdout()):
|
||||
time_sec = split_wav(
|
||||
wav_file,
|
||||
output_dir,
|
||||
|
||||
Reference in New Issue
Block a user