-
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.
feat/ovos_dialog_tts_transformers (#179)
- Loading branch information
Showing
10 changed files
with
151 additions
and
281 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
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
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) OpenVoiceOS 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) OpenVoiceOS 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
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
Oops, something went wrong.