Добрый день. Подскажите пожалуйста деалю следующий запрос
$file = '/var/www/trysome/speach-service/Italian.mp3';
$uuid = '3be1f9ddf4944a529be45f7ca471868b';
$key = '3d79c4f5-dec0-43b2-8ea4-2790696c5722';
$url = "http://asr.yandex.net/asr_xml?uuid=".$uuid."&topic=general&key=".$key;
$curlConfig = array(
CURLOPT_UPLOAD => true,
CURLOPT_POST => true,
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
// CURLOPT_BINARYTRANSFER => true,
CURLOPT_POSTFIELDS, array('audio' => $file),
CURLOPT_VERBOSE => true,
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-type: audio/x-mpeg-3',
'Transfer-Encoding: chunked'
));
curl_setopt_array($ch, $curlConfig);
$result = curl_exec($ch);
print var_dump($result);
в ответ приходит
igor@igor-H81M-S2V:/var/www/trysome/speach-service$ php -f indexroot.php
* Hostname was NOT found in DNS cache
* Trying 213.180.193.202...
* Connected to asr.yandex.net (213.180.193.202) port 80 (#0)
> PUT /asr_xml?uuid=3be1f9ddf49b44529be45f7ca471868b&topic=general&key=3d79c3f5-dec0-43b2-8ea4-2790696c5722 HTTP/1.1
Host: asr.yandex.net
Accept: */*
Content-type: audio/x-mpeg-3
Transfer-Encoding: chunked
Expect: 100-continue
< HTTP/1.1 100 Continue
< Access-Control-Allow-Origin: *
< Connection: close
< Content-Length: 0
< Content-Type: text/html
< Date: Thu, 30 Jul 2015 10:43:52 MSK
* Server YaVoiceProxy2 is not blacklisted
< Server: YaVoiceProxy2
< X-YaReqFinish: 1438242232.212900
< X-YaRequestId: b90423dc-368e-11e4-a9e2-9277ca05b739
* HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad Request
< Access-Control-Allow-Origin: *
< Connection: close
< Content-Length: 45
< Content-Type: text/html
< Date: Thu, 30 Jul 2015 10:43:52 MSK
* Server YaVoiceProxy2 is not blacklisted
< Server: YaVoiceProxy2
< X-YaReqFinish: 1438242232.238032
< X-YaRequestId: b90423dc-368e-11e5-a9e2-9277ca05b739
<
* Closing connection 0
string(45) "Streaming clients must specify audio field!
"
В заголовке указано что ответ 400
пришел, и Streaming clients must specify audio field!
. Это не верный запрос или по указанным параметрам не может отработать сервер?
Могу я как то проверить идет ли отправка аудио дорожки?
Спасибо.