Open Errorbot1122 opened 2 years ago
I achieved it using the following:
config = TaskConfiguration()
config[gc.PPN_TASK_IS_TEXT_FILE_FORMAT] = TextFileFormat.MPLAIN
# other configurations...
rconf = RuntimeConfiguration()
rconf[RuntimeConfiguration.MFCC_MASK_NONSPEECH] = True
# L3 represents word granularity
rconf[RuntimeConfiguration.MFCC_MASK_NONSPEECH_L3] = True
rconf[RuntimeConfiguration.TTS_CACHE] = True
rconf.set_granularity(3) # word-level granularity
task = Task()
task.configuration = config
ExecuteTask(task, rconf=rconf).execute()
task.output_sync_map_file()
In the CLI Interface, you can turn on word level granularity by adding
--presets-word
, but I can't seem to find any function/property that turns that on in the Python Task Interface