The documentation of audinterface.Segment states that we can use any callable that returns a pandas.MultiIndex with the entries start and end as entries as processing function.
This means it should work with the following VAD:
import audb
import audeer
import audiofile
import auvad
db = audb.load('emodb', version='1.4.1')
vad = auvad.Vad()
signal, sampling_rate = audiofile.read(audeer.path(db.root, db.files[0]))
Then we get:
>>> vad.process_signal(signal, sampling_rate)
MultiIndex([('0 days 00:00:00.120000', '0 days 00:00:01.760000')],
names=['start', 'end'])
But when trying to use this with audinterface.Segment
The issue can be solved by providing vad instead of vad.process_signal as process_func. But as vad.process_signal does also return the desired multi index it is not obvious why it should not work.
The documentation of
audinterface.Segment
states that we can use any callable that returns apandas.MultiIndex
with the entriesstart
andend
as entries as processing function.This means it should work with the following VAD:
Then we get:
But when trying to use this with
audinterface.Segment
we get: