无响应,从Firebase云存储中获取数据

时间:2019-03-29 18:17:04

标签: firebase google-cloud-storage actions-on-google

firebase cloud storage bucket format我正在尝试从Firebase云存储中获取音频文件,我以一种方式实现了我获得下载链接,然后将其传递给,然后该文件将播放Google助手在响应中添加音频。我得到回应的问题,请提供帮助,也请查看firebase云存储桶格式的代码和随附的屏幕截图

firebase.initializeApp(config);
let storage = firebase.storage();
let Path = "";
app.intent("Default Welcome Intent", conv => {
let intentName = "Default_Welcome_Intent";

Path = `${intentName}/${Math.floor(Math.random() * 4) + 1}.ogg`;
console.log(Path);
return storage
    .child(Path)
    .getDownloadURL()
    .then(url => conv.ask(`<speak><audio src=${url}/></speak>`))
    .catch(e => {
        console.log(e);
    });
});

0 个答案:

没有答案