음성합성 가이드를 보고 request를 던져봤는데 <response 500>에러가 뜹니다.
import xml.etree.ElementTree as e
import requests
import json
from xml.etree.ElementTree import parse
kakao_speech_url = “https://kakaoi-newtone-openapi.kakao.com/v1/synthesize”
rest_api_key = ‘키’
headers = {
“Content-Type”: “application/xml”,
“Authorization”: "KakaoAK " + rest_api_key,
}
data = “” + “헤이카카오” + ""
data = e.fromstring(data)
print(type(data))
res = requests.post(kakao_speech_url, headers=headers, data=data
)
print(res)
===================================================================================================
<class ‘xml.etree.ElementTree.Element’>
<Response [500]>
rest api로 했는데 뭐가 문제일까요? 해결할 단서를 주시면 정말 감사하겠습니다…