diarize | R Documentation |
Diarization of WAV audios.
diarize(
fromWav,
toRttm = NULL,
autoDir = FALSE,
pycall = "~/miniconda3/envs/pyvoice/bin/python",
token = NULL
)
fromWav |
Either a file or a directory containing WAV files. |
toRttm |
A directory to write RTTM files. If the default |
autoDir |
Logical. Must the directories tree be created? Default: |
pycall |
Python call. See https://github.com/filipezabala/voice for details. |
token |
Access token needed to instantiate pretrained speaker diarization pipeline from pyannote.audio. #1 Install pyannote.audio 3.1 with pip install pyannote.audio (already listed @ https://raw.githubusercontent.com/filipezabala/voice/master/requirements.txt). #2. Accept https://hf.co/pyannote/segmentation-3.0 user conditions. #3 Accept https://hf.co/pyannote-speaker-diarization-3.1 user conditions. #4. Create access token at https://hf.co/settings/tokens. |
When autoDir = TRUE
, the following directories are created: '../mp3'
,'../rttm'
, '../split'
and '../musicxml'
. Use getwd()
to find the parent directory '../'
.
RTTM files in NIST standard. See 'voice::read_rttm'.
## Not run:
library(voice)
wavDir <- list.files(system.file('extdata', package = 'wrassp'),
pattern = glob2rx('*.wav'), full.names = TRUE)
voice::diarize(fromWav = unique(dirname(wavDir)),
toRttm = tempdir(),
token = NULL) # Must enter a token! See documentation.
(rttm <- dir(tempdir(), '.[Rr][Tt][Tt][Mm]$', full.names = TRUE))
file.info(rttm)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.