我正在玩Google语音识别API
成功入门后我试图理解并在第一个例子中进行了一些更改,但我不知道"gs"协议是什么以及如何将其设置为使用我自己的音频文件.
同步request.json
{
"config": {
"encoding":"FLAC",
"sample_rate": 16000
},
"audio": {
"uri":"gs://cloud-samples-tests/speech/brooklyn.flac"
}
}
Run Code Online (Sandbox Code Playgroud)
我试图将gs协议更改为http协议但不起作用.
提前致谢.
我有以下代码:
Serial.print("x:");
Serial.print(x);
Serial.print(" y: ");
Serial.println(y);
Run Code Online (Sandbox Code Playgroud)
并且工作正常。有一个输出示例:
x:41 y: 31
Run Code Online (Sandbox Code Playgroud)
但我想知道是否有一种方法可以将四个句子写成这样:
Serial.println("x:"+x+" y:"+y);
Run Code Online (Sandbox Code Playgroud)
返回错误:
invalid operands of types 'const char*' and 'const char [4]' to binary 'operator+'
Run Code Online (Sandbox Code Playgroud)
任何的想法?。提前致谢。