add private module to create model object for speech api
This commit is contained in:
16
opendbm/api_lib/speech/_transcribe.py
Normal file
16
opendbm/api_lib/speech/_transcribe.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import tempfile
|
||||
|
||||
from opendbm.api_lib.model import OPENDBM_DATA, AudioModel
|
||||
from opendbm.dbm_lib.dbm_features.raw_features.nlp.transcribe import run_transcribe
|
||||
|
||||
|
||||
class Transcribe(AudioModel):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self._params = ["nlp_transcribe", "nlp_totalTime"]
|
||||
|
||||
@AudioModel.prep_func
|
||||
def _fit_transform(self, path):
|
||||
return run_transcribe(
|
||||
path, f"{tempfile.gettempdir()}/", self.r_config, OPENDBM_DATA, save=False
|
||||
)
|
||||
Reference in New Issue
Block a user