Моя цель - создать приложение для преобразования текста в речь.Я использую Google Quickstart Tutorial для преобразования текста в речь .Я следовал за первыми 6 шагами.Я застрял в разделе учебника "Синтезировать аудио из текста".Я получаю ошибки при запуске скопированного кода из учебника и вставке его в консоль.
Скопированный код
curl -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) -H "Content-Type: application/json; charset=utf-8" --data "{
'input':{
'text':'Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets.'
},
'voice':{
'languageCode':'en-gb',
'name':'en-GB-Standard-A',
'ssmlGender':'FEMALE'
},
'audioConfig':{
'audioEncoding':'MP3'
}
}" "https://texttospeech.googleapis.com/v1beta1/text:synthesize" > synthesize-output.txt
Это вывод на моемконсоль от запуска кода.
C:\Users\user\AppData\Local\Google\Cloud SDK>curl -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) -H "Content-Type: application/json; charset=utf-8" --data "{
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
curl: (6) Could not resolve host: print-access-token)
C:\Users\user\AppData\Local\Google\Cloud SDK> 'input':{
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> 'text':'Android is a mobile operating system developed by Google, based on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and tablets.'
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> },
'}' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\user\AppData\Local\Google\Cloud SDK> 'voice':{
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> 'languageCode':'en-gb',
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> 'name':'en-GB-Standard-A',
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> 'ssmlGender':'FEMALE'
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> },
'}' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\user\AppData\Local\Google\Cloud SDK> 'audioConfig':{
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> 'audioEncoding':'MP3'
The filename, directory name, or volume label syntax is incorrect.
C:\Users\user\AppData\Local\Google\Cloud SDK> }
'}' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\user\AppData\Local\Google\Cloud SDK>}" "https://texttospeech.googleapis.com/v1beta1/text:synthesize" > synthesize-output.txt
'}" "https:' is not recognized as an internal or external command,
operable program or batch file.
Не уверен, что это полезно, но вот вывод: список конфигурации gcloud
C:\Users\user\AppData\Local\Google\Cloud SDK>gcloud config list
[core]
account = text-to-speechaccount@sage-instrument-201620.iam.gserviceaccount.com
disable_usage_reporting = False
project = sage-instrument-201620
Your active configuration is: [default]
Другая информация Я наиболее знаком с Python.Я бы описал свои навыки как начинающего.У меня работает окно 10.