|
|
@ -11,15 +11,18 @@
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
from typing import Text
|
|
|
|
|
|
|
|
|
|
|
|
from engine.asr.python.asr_engine import ASREngine
|
|
|
|
from engine.asr.python.asr_engine import ASREngine
|
|
|
|
from engine.tts.python.tts_engine import TTSEngine
|
|
|
|
from engine.tts.python.tts_engine import TTSEngine
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = ['EngineFactory']
|
|
|
|
__all__ = ['EngineFactory']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class EngineFactory(object):
|
|
|
|
class EngineFactory(object):
|
|
|
|
@staticmethod
|
|
|
|
@staticmethod
|
|
|
|
def get_engine(engine_name: str):
|
|
|
|
def get_engine(engine_name: Text):
|
|
|
|
if engine_name == 'asr':
|
|
|
|
if engine_name == 'asr':
|
|
|
|
return ASREngine()
|
|
|
|
return ASREngine()
|
|
|
|
elif engine_name == 'tts':
|
|
|
|
elif engine_name == 'tts':
|
|
|
|