29 lines
799 B
Python
29 lines
799 B
Python
from src import ExecutePipeline
|
|
from src import Plugins
|
|
from src import EchoEngine, TeeEngine
|
|
|
|
def main():
|
|
from plugins.example import MyEngine
|
|
from pathlib import Path
|
|
|
|
plug_conf = Plugins(Path(__file__).resolve().parent)
|
|
pipe = ExecutePipeline(
|
|
# plug_conf.load_engine("asr_engine"),
|
|
# MyEngine(),
|
|
plug_conf.load_engine("chat_ai_engine"),
|
|
TeeEngine(),
|
|
plug_conf.load_engine("tts_engine"),
|
|
plug_conf.load_engine("sounds_play_engine"),
|
|
EchoEngine()
|
|
)
|
|
# exe_input = './tests/offical/sounds/asr_example.wav'
|
|
# exe_input = input('input: ')
|
|
exe_input = '你好'
|
|
res = pipe.execute_engines(exe_input)
|
|
print(res)
|
|
|
|
if __name__ == '__main__':
|
|
from dotenv import load_dotenv
|
|
load_dotenv()
|
|
main()
|