findSpeech | R Documentation |
Detect a single utterance in a recording
findSpeech(
wave,
minAmp = 500,
maxPause = 10000,
beginPad = 2000,
endPad = 4000
)
wave |
Required. Either a |
minAmp |
The minimum envelope value required for a signal to be considered speech. Defaults to 500. See |
maxPause |
The maximum duration of a pause in the utterance. If a segment of non-speech longer than this value is found, it will be considered the end of the utterance. |
beginPad |
How many samples should be included before the beginning of the detected signal to ensure we capture the whole utterance? See |
endPad |
How many samples should be included after the end of the detected signal to ensure we capture the whole utterance? |
If you find the function is excluded too much speech, try lowering the minAmp value or increasing the begin and end padding values. If the function is including too much leading and trailing noise, try increasing the minAmp value or decreasing the begin and end pad values.
A list with 2 numeric values: begin_s = the sample in the original recording that marks the start of the speech signal; and end_s = the sample in the original recording that marks the end of the speech signal.
data("samp_wav")
fs <- findSpeech(samp_wav)
#find the beginning of the utterance in seconds
#(to compare with manual measurements in Praat, for example).
fs$begin_s/samp_wav@samp.rate
#now the end...
fs$end_s/samp_wav@samp.rate
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.