1 Star 0 Fork 14

peteryoung/百度云示例代码

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
tts.cpp 545 Bytes
一键复制 编辑 原始数据 按行查看 历史
刘煜 提交于 2019-12-13 14:05 . add file brief
#include <speech.h>
using namespace std;
string app_id = "17496766";
string api_key = "gG1oXkYhqC72KbsfKNawHZNv";
string secret_key = "ijAXKgNwUaQZbbVXryZmef6DnouQ6EnS";
int main()
{
aip::Speech client(app_id, api_key, secret_key);
ofstream ofile;
string file_ret;
//map<string, string> options;
ofile.open("./test.mp3", ios::out|ios::binary);
Json::Value result = client.text2audio("华清远见", aip::null, file_ret);
if (!file_ret.empty()) {
ofile << file_ret;
}
else {
cout << result.toStyledString();
}
return 0;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/overcomer/baidu_cloud_example.git
git@gitee.com:overcomer/baidu_cloud_example.git
overcomer
baidu_cloud_example
百度云示例代码
master

搜索帮助