
OpenAI API → Unity
목표 : ChatGPT를 유니티에서 구동하기
기본 원리
喋り出しを高速化したり現実の情報とリンクしてAIエージェントを進化させる|ねぎぽよし
ChatGPT APIが公開されてからいろんな人が自分のキャラクターとおしゃべりしたりAITuberが一歩先に進化したりと面白いものがたくさん見れてとても嬉しいです! AI界隈の情報密度が高すぎて↓
note.com
- 위 게시물에선 Assistant에 대해서는 그대로 MessageList에 추가하는 식으로 구현.
참고
ChatGPT APIを使ってAIキャラクターを作ってみる! - Qiita
こんにちは!逆瀬川( https://twitter.com/gyakuse ) です!今日は公開されたばかりのChatGPT APIを使ってAIキャラクターを作ってみます。概要ChatGPT…
qiita.com
10分でできるUnityからChatGPTを呼ぶ方法 - Qiita
APIのKeyを生成する・OpenAIのサイトでAPIキーを作成OpneAiのサイト・ アカウント作成後、PersonalのView API KEysをクリック・Create New sec…
qiita.com
UniTask
유니티 라이브러리, 간단하게 비동기 구현 가능
GitHub - Cysharp/UniTask: Provides an efficient allocation free async/await integration for Unity.
Provides an efficient allocation free async/await integration for Unity. - Cysharp/UniTask
github.com
UniTask 알아보기
Cysharp/UniTaskUniTask 는 유니티용 async-await 통합 패키지이다. CUniTask(사용자 지정 작업과 유사한 개체)가 필요한 이유는 무엇입니까? 작업이 너무 무거우므로 Unity 스레딩(단일 스레드)과 일치하지 않
velog.io
- 메모리 해제를 직접 해줘야해서 이 부분은 코루틴보다 불편.
- TaskTracker를 잘 활용하도록 하자!
NaverDev Papago → Unity
목표 : 한국어 → 일본어로 번역
네이버 파파고 API
애플리케이션 - NAVER Developers
developers.naver.com
curl to json
API 요청하기
Convert curl commands to C#
GitHub is matching all contributions to this project on GitHub Sponsors. Contribute Now
curlconverter.com
json to struct
API 응답 내용을 구조체로 받기
JSON to Go Struct
to TypeScript Declaration to TypeScript Declaration
transform.tools
추가 문제점
- 일본어 전용 폰트로 Noto-sans 폰트를 사용했으나
완벽하게 대응되는 건 아니라서 가끔 글자 깨지는 현상 발생. - API 사용량 제한 문제 (금방 바닥남)
=> 프롬프트 압축하는 방법이 필요.
테스트
플로우차트
영상
Voicevox 에러
문제점
- 너무 긴문장을 요청하면 응답받는데 오랜 시간이 걸린다.
이에 대한 대안으로 긴 문장은 여러 번 나눠서 보내려고 했으나 추가 오류가 발생. - 일단 문장이 길더라도 한번만 보내는 건 상관없지만 (TTS)
긴 문장을 여러 번 보내는 건 오류가 발생. (SplitedTTS)
잦은 요청으로 인한 과부하 방지를 위해 Voicevox API 가 걸어둔 제한으로 추측.
<요청한 내용>
var text = "はい、和食のおすすめを6つご紹介します。\n1.寿司 - 日本の代表的な食べ物で、酢飯に刺身を乗せたものです。生の魚を使った「にぎり寿司」や、酢飯に具材を巻いた「巻き寿司」など様々な種類があります。\n2.うどん - 小麦粉を使って作られた麺で、定番の讃岐うどんや、地方によっては変わった種類のうどんもあります。汁物として食べる「かけうどん」や「ざるうどん」として冷やして食べるものもあります。\n3.てんぷら - シンプルな食材に、サクッとした衣をつけて揚げたもので、海老や野菜など様々な食材を使った天ぷらがあります。\n4.おでん - 野菜や魚を煮込んだ、温かくて栄養たっぷりの一品です。具材を自由に選べる「盛り合わせ」もおすすめです。\n5.お好み焼き - 小麦粉と卵を使った大阪発祥のソウルフードで、キャベツや肉、海老などを入れて焼いたものです。\n6.茶碗蒸し - 卵をベースにした蒸し料理で、鶏肉や海老、野菜などを入れて蒸し上げます。深めの茶碗に盛りつけて食べるのが一般的です。";
<에러 내용>
INFO: 192.168.0.2:60873 - "POST /audio_query?text=%E3%81%AF%E3%81%84%E3%80%81%E5%92%8C%E9%A3%9F%E3%81%AE%E3%81%8A%E3%81%99%E3%81%99%E3%82%81%E3%82%92%EF%BC%96%E3%81%A4%E3%81%94%E7%B4%B9%E4%BB%8B%E3%81%97%E3%81%BE%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60876 - "POST /audio_query?text=%E6%B7%B1%E3%82%81%E3%81%AE%E8%8C%B6%E7%A2%97%E3%81%AB%E7%9B%9B%E3%82%8A%E3%81%A4%E3%81%91%E3%81%A6%E9%A3%9F%E3%81%B9%E3%82%8B%E3%81%AE%E3%81%8C%E4%B8%80%E8%88%AC%E7%9A%84%E3%81%A7%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60878 - "POST /audio_query?text=1.%E5%AF%BF%E5%8F%B8%20-%20%E6%97%A5%E6%9C%AC%E3%81%AE%E4%BB%A3%E8%A1%A8%E7%9A%84%E3%81%AA%E9%A3%9F%E3%81%B9%E7%89%A9%E3%81%A7%E3%80%81%E9%85%A2%E9%A3%AF%E3%81%AB%E5%88%BA%E8%BA%AB%E3%82%92%E4%B9%97%E3%81%9B%E3%81%9F%E3%82%82%E3%81%AE%E3%81%A7%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60874 - "POST /audio_query?text=%E6%B1%81%E7%89%A9%E3%81%A8%E3%81%97%E3%81%A6%E9%A3%9F%E3%81%B9%E3%82%8B%E3%80%8C%E3%81%8B%E3%81%91%E3%81%86%E3%81%A9%E3%82%93%E3%80%8D%E3%82%84%E3%80%8C%E3%81%96%E3%82%8B%E3%81%86%E3%81%A9%E3%82%93%E3%80%8D%E3%81%A8%E3%81%97%E3%81%A6%E5%86%B7%E3%82%84%E3%81%97%E3%81%A6%E9%A3%9F%E3%81%B9%E3%82%8B%E3%82%82%E3%81%AE%E3%82%82%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60877 - "POST /audio_query?text=6.%E8%8C%B6%E7%A2%97%E8%92%B8%E3%81%97%20-%20%E5%8D%B5%E3%82%92%E3%83%99%E3%83%BC%E3%82%B9%E3%81%AB%E3%81%97%E3%81%9F%E8%92%B8%E3%81%97%E6%96%99%E7%90%86%E3%81%A7%E3%80%81%E9%B6%8F%E8%82%89%E3%82%84%E6%B5%B7%E8%80%81%E3%80%81%E9%87%8E%E8%8F%9C%E3%81%AA%E3%81%A9%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E8%92%B8%E3%81%97%E4%B8%8A%E3%81%92%E3%81%BE%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60883 - "POST /audio_query?text=%E5%85%B7%E6%9D%90%E3%82%92%E8%87%AA%E7%94%B1%E3%81%AB%E9%81%B8%E3%81%B9%E3%82%8B%E3%80%8C%E7%9B%9B%E3%82%8A%E5%90%88%E3%82%8F%E3%81%9B%E3%80%8D%E3%82%82%E3%81%8A%E3%81%99%E3%81%99%E3%82%81%E3%81%A7%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60882 - "POST /audio_query?text=4.%E3%81%8A%E3%81%A7%E3%82%93%20-%20%E9%87%8E%E8%8F%9C%E3%82%84%E9%AD%9A%E3%82%92%E7%85%AE%E8%BE%BC%E3%82%93%E3%81%A0%E3%80%81%E6%B8%A9%E3%81%8B%E3%81%8F%E3%81%A6%E6%A0%84%E9%A4%8A%E3%81%9F%E3%81%A3%E3%81%B7%E3%82%8A%E3%81%AE%E4%B8%80%E5%93%81%E3%81%A7%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60881 - "POST /audio_query?text=3.%E3%81%A6%E3%82%93%E3%81%B7%E3%82%89%20-%20%E3%82%B7%E3%83%B3%E3%83%97%E3%83%AB%E3%81%AA%E9%A3%9F%E6%9D%90%E3%81%AB%E3%80%81%E3%82%B5%E3%82%AF%E3%83%83%E3%81%A8%E3%81%97%E3%81%9F%E8%A1%A3%E3%82%92%E3%81%A4%E3%81%91%E3%81%A6%E6%8F%9A%E3%81%92%E3%81%9F%E3%82%82%E3%81%AE%E3%81%A7%E3%80%81%E6%B5%B7%E8%80%81%E3%82%84%E9%87%8E%E8%8F%9C%E3%81%AA%E3%81%A9%E6%A7%98%E3%80%85%E3%81%AA%E9%A3%9F%E6%9D%90%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%9F%E5%A4%A9%E3%81%B7%E3%82%89%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60879 - "POST /audio_query?text=2.%E3%81%86%E3%81%A9%E3%82%93%20-%20%E5%B0%8F%E9%BA%A6%E7%B2%89%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%A6%E4%BD%9C%E3%82%89%E3%82%8C%E3%81%9F%E9%BA%BA%E3%81%A7%E3%80%81%E5%AE%9A%E7%95%AA%E3%81%AE%E8%AE%83%E5%B2%90%E3%81%86%E3%81%A9%E3%82%93%E3%82%84%E3%80%81%E5%9C%B0%E6%96%B9%E3%81%AB%E3%82%88%E3%81%A3%E3%81%A6%E3%81%AF%E5%A4%89%E3%82%8F%E3%81%A3%E3%81%9F%E7%A8%AE%E9%A1%9E%E3%81%AE%E3%81%86%E3%81%A9%E3%82%93%E3%82%82%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60880 - "POST /audio_query?text=%E7%94%9F%E3%81%AE%E9%AD%9A%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%9F%E3%80%8C%E3%81%AB%E3%81%8E%E3%82%8A%E5%AF%BF%E5%8F%B8%E3%80%8D%E3%82%84%E3%80%81%E9%85%A2%E9%A3%AF%E3%81%AB%E5%85%B7%E6%9D%90%E3%82%92%E5%B7%BB%E3%81%84%E3%81%9F%E3%80%8C%E5%B7%BB%E3%81%8D%E5%AF%BF%E5%8F%B8%E3%80%8D%E3%81%AA%E3%81%A9%E6%A7%98%E3%80%85%E3%81%AA%E7%A8%AE%E9%A1%9E%E3%81%8C%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60875 - "POST /audio_query?text=5.%E3%81%8A%E5%A5%BD%E3%81%BF%E7%84%BC%E3%81%8D%20-%20%E5%B0%8F%E9%BA%A6%E7%B2%89%E3%81%A8%E5%8D%B5%E3%82%92%E4%BD%BF%E3%81%A3%E3%81%9F%E5%A4%A7%E9%98%AA%E7%99%BA%E7%A5%A5%E3%81%AE%E3%82%BD%E3%82%A6%E3%83%AB%E3%83%95%E3%83%BC%E3%83%89%E3%81%A7%E3%80%81%E3%82%AD%E3%83%A3%E3%83%99%E3%83%84%E3%82%84%E8%82%89%E3%80%81%E6%B5%B7%E8%80%81%E3%81%AA%E3%81%A9%E3%82%92%E5%85%A5%E3%82%8C%E3%81%A6%E7%84%BC%E3%81%84%E3%81%9F%E3%82%82%E3%81%AE%E3%81%A7%E3%81%99&speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60873 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60876 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK Exception in callback H11Protocol.timeout_keep_alive_handler() handle: <TimerHandle when=212336.921 H11Protocol.timeout_keep_alive_handler()> Traceback (most recent call last): File "asyncio\events.py", line 81, in _run File "uvicorn\protocols\http\h11_impl.py", line 328, in timeout_keep_alive_handler File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 537, in send_with_data_passthrough File "h11\_connection.py", line 272, in _process_event File "h11\_state.py", line 293, in process_event File "h11\_state.py", line 311, in _fire_event_triggered_transitions h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE Exception in callback H11Protocol.timeout_keep_alive_handler() handle: <TimerHandle when=212336.921 H11Protocol.timeout_keep_alive_handler()> Traceback (most recent call last): File "asyncio\events.py", line 81, in _run File "uvicorn\protocols\http\h11_impl.py", line 328, in timeout_keep_alive_handler File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 537, in send_with_data_passthrough File "h11\_connection.py", line 272, in _process_event File "h11\_state.py", line 293, in process_event File "h11\_state.py", line 311, in _fire_event_triggered_transitions h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE Exception in callback H11Protocol.timeout_keep_alive_handler() handle: <TimerHandle when=212336.937 H11Protocol.timeout_keep_alive_handler()> Traceback (most recent call last): File "asyncio\events.py", line 81, in _run File "uvicorn\protocols\http\h11_impl.py", line 328, in timeout_keep_alive_handler File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 537, in send_with_data_passthrough File "h11\_connection.py", line 272, in _process_event File "h11\_state.py", line 293, in process_event File "h11\_state.py", line 311, in _fire_event_triggered_transitions h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE Exception in callback H11Protocol.timeout_keep_alive_handler() handle: <TimerHandle when=212336.953 H11Protocol.timeout_keep_alive_handler()> Traceback (most recent call last): File "asyncio\events.py", line 81, in _run File "uvicorn\protocols\http\h11_impl.py", line 328, in timeout_keep_alive_handler File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 537, in send_with_data_passthrough File "h11\_connection.py", line 272, in _process_event File "h11\_state.py", line 293, in process_event File "h11\_state.py", line 311, in _fire_event_triggered_transitions h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE Exception in callback H11Protocol.timeout_keep_alive_handler() handle: <TimerHandle when=212336.968 H11Protocol.timeout_keep_alive_handler()> Traceback (most recent call last): File "asyncio\events.py", line 81, in _run File "uvicorn\protocols\http\h11_impl.py", line 328, in timeout_keep_alive_handler File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 537, in send_with_data_passthrough File "h11\_connection.py", line 272, in _process_event File "h11\_state.py", line 293, in process_event File "h11\_state.py", line 311, in _fire_event_triggered_transitions h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE Exception in callback H11Protocol.timeout_keep_alive_handler() handle: <TimerHandle when=212336.968 H11Protocol.timeout_keep_alive_handler()> Traceback (most recent call last): File "asyncio\events.py", line 81, in _run File "uvicorn\protocols\http\h11_impl.py", line 328, in timeout_keep_alive_handler File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 537, in send_with_data_passthrough File "h11\_connection.py", line 272, in _process_event File "h11\_state.py", line 293, in process_event File "h11\_state.py", line 311, in _fire_event_triggered_transitions h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE Exception in callback H11Protocol.timeout_keep_alive_handler() handle: <TimerHandle when=212336.968 H11Protocol.timeout_keep_alive_handler()> Traceback (most recent call last): File "asyncio\events.py", line 81, in _run File "uvicorn\protocols\http\h11_impl.py", line 328, in timeout_keep_alive_handler File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 537, in send_with_data_passthrough File "h11\_connection.py", line 272, in _process_event File "h11\_state.py", line 293, in process_event File "h11\_state.py", line 311, in _fire_event_triggered_transitions h11._util.LocalProtocolError: can't handle event type ConnectionClosed when role=SERVER and state=SEND_RESPONSE INFO: 192.168.0.2:60874 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 75, in __call__ File "fastapi\applications.py", line 208, in __call__ File "starlette\applications.py", line 112, in __call__ File "starlette\middleware\errors.py", line 181, in __call__ File "starlette\middleware\errors.py", line 159, in __call__ File "starlette\middleware\base.py", line 56, in __call__ File "starlette\responses.py", line 227, in __call__ File "anyio\_backends\_asyncio.py", line 662, in __aexit__ File "starlette\responses.py", line 223, in wrap File "starlette\responses.py", line 205, in stream_response File "starlette\middleware\errors.py", line 156, in _send File "uvicorn\protocols\http\h11_impl.py", line 452, in send File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 527, in send_with_data_passthrough h11._util.LocalProtocolError: Can't send data when our state is ERROR INFO: 192.168.0.2:60878 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 75, in __call__ File "fastapi\applications.py", line 208, in __call__ File "starlette\applications.py", line 112, in __call__ File "starlette\middleware\errors.py", line 181, in __call__ File "starlette\middleware\errors.py", line 159, in __call__ File "starlette\middleware\base.py", line 56, in __call__ File "starlette\responses.py", line 227, in __call__ File "anyio\_backends\_asyncio.py", line 662, in __aexit__ File "starlette\responses.py", line 223, in wrap File "starlette\responses.py", line 205, in stream_response File "starlette\middleware\errors.py", line 156, in _send File "uvicorn\protocols\http\h11_impl.py", line 452, in send File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 527, in send_with_data_passthrough h11._util.LocalProtocolError: Can't send data when our state is ERROR INFO: 192.168.0.2:60883 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60877 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 75, in __call__ File "fastapi\applications.py", line 208, in __call__ File "starlette\applications.py", line 112, in __call__ File "starlette\middleware\errors.py", line 181, in __call__ File "starlette\middleware\errors.py", line 159, in __call__ File "starlette\middleware\base.py", line 56, in __call__ File "starlette\responses.py", line 227, in __call__ File "anyio\_backends\_asyncio.py", line 662, in __aexit__ File "starlette\responses.py", line 223, in wrap File "starlette\responses.py", line 205, in stream_response File "starlette\middleware\errors.py", line 156, in _send File "uvicorn\protocols\http\h11_impl.py", line 452, in send File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 527, in send_with_data_passthrough h11._util.LocalProtocolError: Can't send data when our state is ERROR INFO: 192.168.0.2:60882 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 75, in __call__ File "fastapi\applications.py", line 208, in __call__ File "starlette\applications.py", line 112, in __call__ File "starlette\middleware\errors.py", line 181, in __call__ File "starlette\middleware\errors.py", line 159, in __call__ File "starlette\middleware\base.py", line 56, in __call__ File "starlette\responses.py", line 227, in __call__ File "anyio\_backends\_asyncio.py", line 662, in __aexit__ File "starlette\responses.py", line 223, in wrap File "starlette\responses.py", line 205, in stream_response File "starlette\middleware\errors.py", line 156, in _send File "uvicorn\protocols\http\h11_impl.py", line 452, in send File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 527, in send_with_data_passthrough h11._util.LocalProtocolError: Can't send data when our state is ERROR INFO: 192.168.0.2:60879 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 75, in __call__ File "fastapi\applications.py", line 208, in __call__ File "starlette\applications.py", line 112, in __call__ File "starlette\middleware\errors.py", line 181, in __call__ File "starlette\middleware\errors.py", line 159, in __call__ File "starlette\middleware\base.py", line 56, in __call__ File "starlette\responses.py", line 227, in __call__ File "anyio\_backends\_asyncio.py", line 662, in __aexit__ File "starlette\responses.py", line 223, in wrap File "starlette\responses.py", line 205, in stream_response File "starlette\middleware\errors.py", line 156, in _send File "uvicorn\protocols\http\h11_impl.py", line 452, in send File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 527, in send_with_data_passthrough h11._util.LocalProtocolError: Can't send data when our state is ERROR INFO: 192.168.0.2:60881 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 75, in __call__ File "fastapi\applications.py", line 208, in __call__ File "starlette\applications.py", line 112, in __call__ File "starlette\middleware\errors.py", line 181, in __call__ File "starlette\middleware\errors.py", line 159, in __call__ File "starlette\middleware\base.py", line 56, in __call__ File "starlette\responses.py", line 227, in __call__ File "anyio\_backends\_asyncio.py", line 662, in __aexit__ File "starlette\responses.py", line 223, in wrap File "starlette\responses.py", line 205, in stream_response File "starlette\middleware\errors.py", line 156, in _send File "uvicorn\protocols\http\h11_impl.py", line 452, in send File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 527, in send_with_data_passthrough h11._util.LocalProtocolError: Can't send data when our state is ERROR INFO: 192.168.0.2:60880 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK INFO: 192.168.0.2:60875 - "POST /synthesis?speaker=3 HTTP/1.1" 200 OK ERROR: Exception in ASGI application Traceback (most recent call last): File "uvicorn\protocols\http\h11_impl.py", line 373, in run_asgi File "uvicorn\middleware\proxy_headers.py", line 75, in __call__ File "fastapi\applications.py", line 208, in __call__ File "starlette\applications.py", line 112, in __call__ File "starlette\middleware\errors.py", line 181, in __call__ File "starlette\middleware\errors.py", line 159, in __call__ File "starlette\middleware\base.py", line 56, in __call__ File "starlette\responses.py", line 227, in __call__ File "anyio\_backends\_asyncio.py", line 662, in __aexit__ File "starlette\responses.py", line 223, in wrap File "starlette\responses.py", line 205, in stream_response File "starlette\middleware\errors.py", line 156, in _send File "uvicorn\protocols\http\h11_impl.py", line 452, in send File "h11\_connection.py", line 512, in send File "h11\_connection.py", line 527, in send_with_data_passthrough h11._util.LocalProtocolError: Can't send data when our state is ERROR
해결방안
- 한계를 정해두고 그걸 넘어선 긴 문장은 한 번에 보낸다.
한계를 넘지 않은 문장은 나눠서 보낸다. - 다른 API를 찾아본다.
'개인 프로젝트 > KarinAI' 카테고리의 다른 글
KarinAI :: Voice conversion (2) (0) | 2024.02.22 |
---|---|
KarinAI :: Voice conversion (1) (0) | 2024.02.22 |
KarinAI :: STT & IOS Build (1) | 2024.02.22 |
KarinAI :: MMD Model Import with Oculus Lipsync (0) | 2024.02.22 |
KarinAI :: OpenAI & Voicevox with Python (0) | 2024.02.22 |
틀린 부분은 언제든지 말씀해주세요!!! 감사합니다!