-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
listener has AudioTransformers core has MetadataTransformers and UtteranceTransformers this PR extends the concept to ovos-audio for text before TTS stage, and wav file after TTS but before playback use case demonstration https://gist.github.com/JarbasAl/16788bdcff3fa5bfb3634d6f2116cc04 this ties into OpenVoiceOS/ovos-persona#4
- Loading branch information
Showing
4 changed files
with
112 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ dist | |
|
||
# Created by unit tests | ||
.pytest_cache/ | ||
/.gtm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from ovos_plugin_manager.templates.transformers import DialogTransformer, TTSTransformer | ||
from ovos_plugin_manager.utils import PluginTypes | ||
from ovos_plugin_manager.utils import load_plugin, find_plugins | ||
|
||
|
||
def find_dialog_transformer_plugins() -> dict: | ||
""" | ||
Find all installed plugins | ||
@return: dict plugin names to entrypoints | ||
""" | ||
return find_plugins(PluginTypes.DIALOG_TRANSFORMER) | ||
|
||
|
||
def load_dialog_transformer_plugin(module_name: str) -> type(DialogTransformer): | ||
"""Wrapper function for loading dialog_transformer plugin. | ||
Arguments: | ||
(str) Mycroft dialog_transformer module name from config | ||
Returns: | ||
class: found dialog_transformer plugin class | ||
""" | ||
return load_plugin(module_name, PluginTypes.DIALOG_TRANSFORMER) | ||
|
||
|
||
def find_tts_transformer_plugins() -> dict: | ||
""" | ||
Find all installed plugins | ||
@return: dict plugin names to entrypoints | ||
""" | ||
return find_plugins(PluginTypes.TTS_TRANSFORMER) | ||
|
||
|
||
def load_tts_transformer_plugin(module_name: str) -> type(TTSTransformer): | ||
"""Wrapper function for loading dialog_transformer plugin. | ||
Arguments: | ||
(str) Mycroft dialog_transformer module name from config | ||
Returns: | ||
class: found dialog_transformer plugin class | ||
""" | ||
return load_plugin(module_name, PluginTypes.TTS_TRANSFORMER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters