我正在使用libwebsocket库创建一个c客户端,它调用ibm- watson speech to text服务器。因此,我使用了minimal-ws-client-rx示例网关,然后当我尝试运行它给出的代码时,我将i.address更改为“https://github.com/warmcat/libwebsockets”,并将i.path更改为"/speech-to-text/api/
IBM的表示,下面的节点后端代码使您能够使用Use the API key to have the SDK manage the lifecycle of the token.我尝试调用方法getToken来获取令牌:const { IamAuthenticator({
apikey: 'my-api-key
我使用axios将HTTP GET请求发送到下载URL。axios返回一个流,所以我使用fs.createReadStream(response)将文件流式传输到IBM Cloud Speech- to -Text。alt=media&token=871b9401-c6af-4c38-aaf3-889bb5952d0e', // the download URL for the audio file
responseType或者我应该使用流?alt=med