Spaces:
Runtime error
Runtime error
nithinraok
commited on
Commit
β’
1ac7d5c
1
Parent(s):
00de2d3
Update app.py
Browse files
app.py
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
from nemo.collections.asr.models import NeuralDiarizer
|
2 |
import gradio as gr
|
3 |
import pandas as pd
|
4 |
|
5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
6 |
|
7 |
-
model = NeuralDiarizer.from_pretrained("diar_msdd_telephonic").to(device)
|
8 |
|
9 |
def run_diarization(path1):
|
10 |
-
annotation = model(path1)
|
11 |
-
rttm=annotation.to_rttm()
|
12 |
df = pd.DataFrame(columns=['start_time', 'end_time', 'speaker'])
|
13 |
-
for idx,line in enumerate(rttm.splitlines()):
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
return df
|
19 |
|
20 |
inputs = [
|
@@ -29,8 +29,8 @@ description = (
|
|
29 |
|
30 |
article = (
|
31 |
"<p style='text-align: center'>"
|
32 |
-
"<a href='https://
|
33 |
-
"<a href='https://arxiv.org/
|
34 |
"<a href='https://github.com/NVIDIA/NeMo' target='_blank'>π§βπ» Repository</a>"
|
35 |
"</p>"
|
36 |
)
|
|
|
1 |
+
# from nemo.collections.asr.models import NeuralDiarizer
|
2 |
import gradio as gr
|
3 |
import pandas as pd
|
4 |
|
5 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
6 |
|
7 |
+
# model = NeuralDiarizer.from_pretrained("diar_msdd_telephonic").to(device)
|
8 |
|
9 |
def run_diarization(path1):
|
10 |
+
# annotation = model(path1)
|
11 |
+
# rttm=annotation.to_rttm()
|
12 |
df = pd.DataFrame(columns=['start_time', 'end_time', 'speaker'])
|
13 |
+
# for idx,line in enumerate(rttm.splitlines()):
|
14 |
+
# split = line.split()
|
15 |
+
# start_time, duration, speaker = split[3], split[4], split[7]
|
16 |
+
# end_time = float(start_time) + float(duration)
|
17 |
+
# df.loc[idx] = start_time, end_time, speaker
|
18 |
return df
|
19 |
|
20 |
inputs = [
|
|
|
29 |
|
30 |
article = (
|
31 |
"<p style='text-align: center'>"
|
32 |
+
"<a href='https://catalog.ngc.nvidia.com/orgs/nvidia/teams/nemo/models/diar_msdd_telephonic' target='_blank'>ποΈ Learn more about MSDD model</a> | "
|
33 |
+
"<a href='https://arxiv.org/abs/2203.15974' target='_blank'>π MSDD paper</a> | "
|
34 |
"<a href='https://github.com/NVIDIA/NeMo' target='_blank'>π§βπ» Repository</a>"
|
35 |
"</p>"
|
36 |
)
|