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
Copy file name to clipboardexpand all lines: NEWS.md
+4
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,7 @@
1
+
## CHANGES IN audio.whisper VERSION 0.4.1
2
+
3
+
- Added function predict.whisper_transcription which allows to assign a transcription segment to either a left/right channel based on a Voice Activity Detection
#' @title Predict to which channel a transcription section belongs
4
+
#' @description Audio files containing 2 channels which were transcribed with \code{\link{predict.whisper}},
5
+
#' you can use the results of a Voice Activity Detection by channel (either with R packages
6
+
#' \code{audio.vadwebrtc} or \code{audio.vadsilero}) to assign the text segments to each of the channels.\cr
7
+
#' This is done by looking for each text segment how many seconds overlap there is with the voiced sections which are identified
8
+
#' by the Voice Activity Detection.
9
+
#' @param object an object of class \code{whisper_transcription} as returned by \code{\link{predict.whisper}}
10
+
#' @param vad an object of class \code{webrtc-gmm-bychannel} as returned by function \code{VAD_channel} from R package \code{audio.vadwebrtc} with information of the detected voice in at least channels 1 and 2.
11
+
#' ar a list with element vad_segments containing a data.frame with columns channel, start, end and has_voice with information at which second
12
+
#' there was a voice in the audio
13
+
#' @param type character string with currently only possible value: 'channel' which does a 2-speaker channel assignment
14
+
#' @param threshold numeric in 0-1 range indicating if the difference between the probability that the segment was from the left channel 1 or the right channel 2 is smaller than this amount, the column \code{channel} will be set to 'both'. Defaults to 0.
15
+
#' @param ... not used
16
+
#' @return an object of class \code{whisper_transcription} as documented in \code{\link{predict.whisper}}
17
+
#' where element \code{data} contains the following extra columns indicating which channel the transcription is probably from
18
+
#' \itemize{
19
+
#' \item{channel: either 'left', 'right' or 'both' indicating the transcription segment was either from the left channel (1), the right channel (2) or probably from both as identified by the Voice Activity Detecion}
20
+
#' \item{channel_probability: a number between 0 and 1 indicating for that specific segment the ratio of the amount of voiced seconds in the most probably channel to
21
+
#' the sum of the amount of voiced seconds in the left + the right channel}
22
+
#' \item{duration: how long (in seconds) the from-to segment is}
23
+
#' \item{duration_voiced_left: how many seconds there was a voiced signal on the left channel (channel 1) as identified by \code{vad}}
24
+
#' \item{duration_voiced_right: how many seconds there was a voiced signal on the right channel (channel 2) as identified by \code{vad}}
0 commit comments