AS3,百度语音识别,返回数据问题
使用的是百度语音识别API地址:http://yuyin.baidu.com/docs/tts/136返回数据格式 百度回复是mp3,但是我转为bytes为null,
返回格式如下:
文件在:UIManager.as
附件:
uploader = new URLStream();
private function onUploadCompleteHandler(e:Event):void
{
var bytes:ByteArray = new ByteArray();
uploader.readBytes(bytes);
// sound.extract(by, by.length);
sound = new Sound();
sound.loadCompressedDataFromByteArray(bytes, bytes.length);
soundChannel = sound.play(0,999);
_soundTransform = new SoundTransform();
soundChannel.soundTransform = _soundTransform;
} URLStream 也行不过要把 dataFormat 改成二进制
页:
[1]