You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** starting from version 0.4, installing pyannote.audio is mandatory to run the default system or to use pyannote-based models. In any other case, this step can be ignored.
82
+
83
+
5) Install diart:
38
84
```shell
39
85
pip install diart
40
86
```
41
87
42
-
## Stream your own audio
88
+
## Stream audio
43
89
44
-
### A recorded conversation
90
+
### From the command line
91
+
92
+
A recorded conversation:
45
93
46
94
```shell
47
-
python -m diart.stream /path/to/audio.wav
95
+
diart.stream /path/to/audio.wav
48
96
```
49
97
50
-
### From your microphone
98
+
A live conversation:
51
99
52
100
```shell
53
-
python -m diart.stream microphone
101
+
diart.stream microphone
54
102
```
55
103
56
-
See `python -m diart.stream -h` for more options.
104
+
See `diart.stream -h` for more options.
57
105
58
-
##Inference API
106
+
### From python
59
107
60
-
Run a customized real-time speaker diarization pipeline over an audio stream with `diart.inference.RealTimeInference`:
108
+
Run a real-time speaker diarization pipeline over an audio stream with `RealTimeInference`:
61
109
62
110
```python
63
111
from diart.sources import MicrophoneAudioSource
64
112
from diart.inference import RealTimeInference
65
113
from diart.pipelines import OnlineSpeakerDiarization, PipelineConfig
Diart implements a hyper-parameter optimizer based on [optuna](https://optuna.readthedocs.io/en/stable/index.html) that allows you to tune any pipeline to any dataset.
This will use `/out/dir/tmp` as a working directory and write results to an sqlite database in `/out/dir`.
187
+
188
+
### Distributed optimization
189
+
190
+
For bigger datasets, it is sometimes more convenient to run multiple optimization processes in parallel.
191
+
To do this, create a study on a [recommended DBMS](https://optuna.readthedocs.io/en/stable/tutorial/10_key_features/004_distributed.html#sphx-glr-tutorial-10-key-features-004-distributed-py) (e.g. MySQL or PostgreSQL) making sure that the study and database names match:
192
+
193
+
```shell
194
+
mysql -u root -e "CREATE DATABASE IF NOT EXISTS example"
@@ -165,7 +302,7 @@ To obtain the best results, make sure to use the following hyper-parameters:
165
302
`diart.benchmark` and `diart.inference.Benchmark` can quickly run and evaluate the pipeline, and even measure its real-time latency. For instance, for a DIHARD III configuration:
This runs a faster inference by pre-calculating model outputs in batches.
191
-
See `python -m diart.benchmark -h` for more options.
328
+
See `diart.benchmark -h` for more options.
192
329
193
330
For convenience and to facilitate future comparisons, we also provide the [expected outputs](/expected_outputs) of the paper implementation in RTTM format for every entry of Table 1 and Figure 5. This includes the VBx offline topline as well as our proposed online approach with latencies 500ms, 1s, 2s, 3s, 4s, and 5s.
0 commit comments