Ver Fonte

change test env from get to post

ming há 3 anos atrás
pai
commit
25501e5fdf
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      api/main.py

+ 3 - 1
api/main.py

@@ -680,7 +680,7 @@ def call_voice(text):
     c = rpyc.connect("localhost", 8868)
     c._config['sync_request_timeout'] = None
     remote_svc = c.root
-    my_answer = remote_svc.call_avatar(text) # method call
+    my_answer = remote_svc.make_speech(text) # method call
     src_path = '/home/ming/AI_Anchor/OpenshotService/speech.mp3'
     shutil.copy(src_path,'/home/ming/speech.mp3')
     os.remove(src_path)
@@ -689,6 +689,8 @@ class text_in(BaseModel):
     text: str
 @app.post("/make_voice")
 async def make_voice(in_text:text_in):
+    print(in_text.text)
+    print(len(in_text.text))
     x = threading.Thread(target=call_voice, args=(in_text.text))
     x.start()