Curl 未指定url//文本到语音IBM Bluemix
我开始用curl进行文本到语音转换,我有麻烦了。我使用凭据从命令行中的示例复制代码,但有一个错误我无法解决:curl:未指定URL 以下是我尝试的代码:Curl 未指定url//文本到语音IBM Bluemix,curl,command-line,ibm-cloud,Curl,Command Line,Ibm Cloud,我开始用curl进行文本到语音转换,我有麻烦了。我使用凭据从命令行中的示例复制代码,但有一个错误我无法解决:curl:未指定URL 以下是我尝试的代码: curl -X POST -u {username}:{password} \ --header "Content-Type: application/json" \ --header "Accept: audio/wav" \ --data "{\"text\":\"hello world\"}" \ --output hello_world
curl -X POST -u {username}:{password} \
--header "Content-Type: application/json" \
--header "Accept: audio/wav" \
--data "{\"text\":\"hello world\"}" \
--output hello_world.wav \
"https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize"
下面是命令行(win10)中的代码:
我能帮忙吗?:) 您在(不必要的引用)URL和
--output
开关的值之间没有留下任何空间。在Windows提示符中,由于quote中的quote,这让人望而生畏。我尝试了这个方法并成功:
它仍然不起作用。始终是相同的错误,没有指定URL。您正在转义希望正常的空白,并将其视为参数分隔符,以及图像中不匹配的引号。单引用整个数据值并正常写入,
--data'{“text”:“hello world”}
,应该足够了。