Spaces:
Runtime error
Runtime error
Artem Gorlanov
commited on
Commit
•
8879dcb
1
Parent(s):
d7280b3
fix
Browse files- app.py +1 -3
- main_pipeline.py +0 -13
- utils/diarization_pipeline.py +1 -1
app.py
CHANGED
@@ -1,4 +1,3 @@
|
|
1 |
-
import argparse
|
2 |
|
3 |
import torch
|
4 |
from scipy.io.wavfile import write
|
@@ -35,6 +34,5 @@ app = gr.Interface(
|
|
35 |
|
36 |
)
|
37 |
|
38 |
-
|
39 |
app.launch(debug=True, enable_queue=True,
|
40 |
-
)
|
|
|
|
|
1 |
|
2 |
import torch
|
3 |
from scipy.io.wavfile import write
|
|
|
34 |
|
35 |
)
|
36 |
|
|
|
37 |
app.launch(debug=True, enable_queue=True,
|
38 |
+
)
|
main_pipeline.py
CHANGED
@@ -1,19 +1,8 @@
|
|
1 |
import argparse
|
2 |
-
import librosa
|
3 |
-
import torch
|
4 |
-
import os
|
5 |
-
|
6 |
-
from scipy.io.wavfile import write
|
7 |
-
from tqdm import tqdm
|
8 |
|
9 |
from utils.denoise_pipeline import denoise
|
10 |
from utils.diarization_pipeline import DiarizationPipeline
|
11 |
|
12 |
-
import numpy as np
|
13 |
-
|
14 |
-
import pandas as pd
|
15 |
-
import soundfile as sf
|
16 |
-
|
17 |
|
18 |
class CleaningPipeline:
|
19 |
def __init__(self, device):
|
@@ -48,5 +37,3 @@ if __name__ == '__main__':
|
|
48 |
opt = parser.parse_args()
|
49 |
cleaning_pipeline = CleaningPipeline('cuda:0')
|
50 |
cleaning_pipeline(input_audio_path=opt.audio_path)
|
51 |
-
# for _ in tqdm(range(10)):
|
52 |
-
# main_pipeline(audio_path=opt.audio_path, device=opt.device)
|
|
|
1 |
import argparse
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
from utils.denoise_pipeline import denoise
|
4 |
from utils.diarization_pipeline import DiarizationPipeline
|
5 |
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
class CleaningPipeline:
|
8 |
def __init__(self, device):
|
|
|
37 |
opt = parser.parse_args()
|
38 |
cleaning_pipeline = CleaningPipeline('cuda:0')
|
39 |
cleaning_pipeline(input_audio_path=opt.audio_path)
|
|
|
|
utils/diarization_pipeline.py
CHANGED
@@ -648,7 +648,7 @@ class DiarizationPipeline:
|
|
648 |
labels = durs[durs['duration'] / durs.sum()['duration'] > 0.015].index
|
649 |
return segments[segments.label.isin(labels)]
|
650 |
|
651 |
-
def __call__(self, input_wav_path: str)-> dict:
|
652 |
|
653 |
segments = self.diar.diarize(input_wav_path,
|
654 |
num_speakers=None,
|
|
|
648 |
labels = durs[durs['duration'] / durs.sum()['duration'] > 0.015].index
|
649 |
return segments[segments.label.isin(labels)]
|
650 |
|
651 |
+
def __call__(self, input_wav_path: str) -> dict:
|
652 |
|
653 |
segments = self.diar.diarize(input_wav_path,
|
654 |
num_speakers=None,
|