텍스트 를 음성전환 API를 찾고 있습니다.
아마존 폴리 외 지원해 주는 곳이 어디 있을까요?
밑에 terrorboy님 이 알려주신 https://any-api.com 은 IBM Speech to Text 기반이라 찾고 있는거와 정반대 서비스라서요.
테스트 해볼수 있는 주소 주시면 고맙겠습니다.
댓글 13개
<?php
$client_id = "YOUR_CLIENT_ID";
$client_secret = "YOUR_CLIENT_SECRET";
$encText = urlencode("반갑습니다.");
$postvars = "speaker=mijin&speed=0&text=".$encText;
$url = "https://openapi.naver.com/v1/voice/tts.bin";
$is_post = true;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, $is_post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, $postvars);
$headers = array();
$headers[] = "X-Naver-Client-Id: ".$client_id;
$headers[] = "X-Naver-Client-Secret: ".$client_secret;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec ($ch);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
echo "status_code:".$status_code."<br>";
curl_close ($ch);
if($status_code == 200) {
//echo $response;
$fp = fopen("tts.mp3", "w+");
fwrite($fp, $response);
fclose($fp);
echo "<a href='tts.mp3'>TTS재생</a>";
} else {
echo "Error 내용:".$response;
}
?>
$client_id = "YOUR_CLIENT_ID";
$client_secret = "YOUR_CLIENT_SECRET";
$encText = urlencode("반갑습니다.");
$postvars = "speaker=mijin&speed=0&text=".$encText;
$url = "https://openapi.naver.com/v1/voice/tts.bin";
$is_post = true;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, $is_post);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, $postvars);
$headers = array();
$headers[] = "X-Naver-Client-Id: ".$client_id;
$headers[] = "X-Naver-Client-Secret: ".$client_secret;
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec ($ch);
$status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
echo "status_code:".$status_code."<br>";
curl_close ($ch);
if($status_code == 200) {
//echo $response;
$fp = fopen("tts.mp3", "w+");
fwrite($fp, $response);
fclose($fp);
echo "<a href='tts.mp3'>TTS재생</a>";
} else {
echo "Error 내용:".$response;
}
?>
게시글 목록
| 번호 | 제목 |
|---|---|
| 1717438 | |
| 1717431 | |
| 1717422 | |
| 1717414 | |
| 1717412 | |
| 1717407 | |
| 1717401 | |
| 1717393 | |
| 1717386 | |
| 1717379 | |
| 1717378 | |
| 1717365 | |
| 1717364 | |
| 1717360 | |
| 1717359 | |
| 1717346 | |
| 1717344 | |
| 1717333 | |
| 1717327 | |
| 1717313 | |
| 1717312 | |
| 1717310 | |
| 1717307 | |
| 1717306 | |
| 1717304 | |
| 1717291 | |
| 1717283 | |
| 1717280 | |
| 1717268 | |
| 1717265 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기