소스 검색

change test env from get to post

ming 3 년 전
부모
커밋
25501e5fdf
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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()