ibm-cloud-docs / text-to-speech

text-to-speech
6 stars 26 forks source link

I don't know how to make lines, in the cURL program #111

Closed brandon-Revelation1-17-18AMEN closed 4 years ago

brandon-Revelation1-17-18AMEN commented 5 years ago

Hey, I really want to use the text to speech program, but I haven't done programing before, so I am stuck at very simple bits, and I can't get pass the tutorial, is there any simpler tutorial, or any other tools that can help me learn this "stuff".

From Brandon

jeffpk62 commented 5 years ago

Hi, @brandon-Revelation1-17-18AMEN. The tutorial at https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-gettingStarted is about the simplest example use of the service that we have. Did you get your credentials and URL to use with the example requests? Do you have access to the curl utility? What operating system are you working on?

If you can answer these questions, I can try to help you through the experience. To use curl with the examples is really quite simple once you have everything in place and get the hang of it. The service does provide an application programming interface, but curl allows you execute calls from the command line, which may just require a little guidance.

brandon-Revelation1-17-18AMEN commented 5 years ago

windows 10.

Also I tried copy the example, and paste the example in a word document, and remove the '{apikey}' with my apikey, and replace the '{url}' with my url. then copy whole of that, then I paste it, in Git Bash,

curl -X POST -u "apikey:{replaced with the apikey that I am using}" ^ --header "Content-Type: application/json" ^ --header "Accept: audio/wav" ^ --data "{\"text\":\"hello world\"}" ^ --output hello_world.wav ^ "{replaced with the url I am using}/v1/synthesize"

But I get this... al % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: ^

brand@DESKTOP-HSK6N04 MINGW64 ~ $ --header "Content-Type: application/json" ^ bash: --header: command not found

brand@DESKTOP-HSK6N04 MINGW64 ~ $ --header "Accept: audio/wav" ^ bash: --header: command not found

brand@DESKTOP-HSK6N04 MINGW64 ~ $ --data "{\"text\":\"hello world\"}" ^ bash: --data: command not found

brand@DESKTOP-HSK6N04 MINGW64 ~ $ --output hello_world.wav ^ bash: --output: command not found

brand@DESKTOP-HSK6N04 MINGW64 ~ $ "{replaced with my URL}/v1/synthesize"

I am using Git Bash, is that a cURL. utility? How do I know for sure. but I have problems going down a line, when I want to go down a line, it active the command, prematurally. And when it does go down a line, I don't how to activate the whole code at once, as when I press ENTER, it goes down a line, instead.

I did replaced the parts where the examples says, that the '{apikey}' and '{url}' need to be replaced with my own. Okay thanks.

jeffpk62 commented 5 years ago

I have seen other issues with curl on Windows. With the curl utility installed in a bash shell, you would use the backslash as an escape character for newlines, as shown in the tutorial by default. You can also specify the entire command, with all options and the URL, on a single line (that's true in a command prompt or shell, such as git bash). In this case, you remove all backslashes, carets, and any newline escape characters. It's sometimes easier to enter the full content of the command into an editor and then just copy and paste that text into the shell, since typing long lines of input is error-prone.

brandon-Revelation1-17-18AMEN commented 5 years ago

Just checking, what are the required programs that need to be on my Windows computer? So I can check if I have all of the required programs, to use the Text to Speech service fully.

jeffpk62 commented 5 years ago

The only program you need to have installed locally is curl. This section of the tutorial shows you how to check that it's present and where to get it if it isn't:

https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-gettingStarted#getting-started-curl

That will make an HTTP request to the service on your behalf. From your earlier comments, it looks as if curl is installed, so you should be good there.

If you get an error that refers to SSL certification, you can include the -k option with the curl command to disable SSL verification. That can happen if your certificate store isn't updated. Since you're just experimenting with the service, disabling SSL is not an issue. You would just add the option to the command as curl -k -X POST -u {...everything else for the command...}.

brandon-Revelation1-17-18AMEN commented 5 years ago

Thanks, for helping, but I just find out that I can't use the Text to Speech service, what I was planning to use it for, (which was using it in YouTube videos), but thanks for helping anyway.

From Brandon


From: Jeff Kaminski notifications@github.com Sent: Thursday, 25 July 2019 10:57 PM To: IBM-Bluemix-Docs/text-to-speech text-to-speech@noreply.github.com Cc: brandon-Revelation1-17-18AMEN brandon-fidler@outlook.com; Mention mention@noreply.github.com Subject: Re: [IBM-Bluemix-Docs/text-to-speech] I don't know how to make lines, in the cURL program (#111)

The only program you need to have installed locally is curl. This section of the tutorial shows you how to check that it's present and where to get it if it isn't:

https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-gettingStarted#getting-started-curl

That will make an HTTP request to the service on your behalf. From your earlier comments, it looks as if curl is installed, so you should be good there.

If you get an error that refers to SSL certification, you can include the -k option with the curl command to disable SSL verification. That can happen if your certificate store isn't updated. Since you're just experimenting with the service, disabling SSL is not an issue. You would just add the option to the command as curl -k -X POST -u {...everything else for the command...}.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/IBM-Bluemix-Docs/text-to-speech/issues/111?email_source=notifications&email_token=AMV6CGRTLXR3NJEJARMLOO3QBGPMJA5CNFSM4IGDE6CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ZMMEA#issuecomment-515032592, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMV6CGQ6XC3AKBIDZIPBWMTQBGPMJANCNFSM4IGDE6CA.