add private module to create model object for acoustics api
This commit is contained in:
20
opendbm/api_lib/verbal_acoustics/_pause_characteristics.py
Normal file
20
opendbm/api_lib/verbal_acoustics/_pause_characteristics.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import pandas as pd
|
||||
|
||||
from opendbm.api_lib.model import AudioModel
|
||||
from opendbm.dbm_lib import run_pause_segment
|
||||
|
||||
|
||||
class PauseCharacteristics(AudioModel):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._params = [
|
||||
"aco_totaltime",
|
||||
"aco_speakingtime",
|
||||
"aco_numpauses",
|
||||
"aco_pausetime",
|
||||
"aco_pausefrac",
|
||||
]
|
||||
|
||||
@AudioModel.prep_func
|
||||
def _fit_transform(self, path, **kwargs):
|
||||
return run_pause_segment(path, ".", self.r_config, save=False)
|
||||
Reference in New Issue
Block a user