
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
What does a 401 error mean?
enter "http 401" into Yandex and it tells you everything in detail.
code result -"Webrequest4Voice(EURCHF,D1) Download error 'https://api.eu-gb.text-to-speech.watson.cloud.ibm.com/instances/9886a3ce-5734-455f-8f78-7a56381da686/v1/synthesize?text=TEST', code 401"
401 isserver requires authentication
Take a query emulator (e.g. postman) and make a normal request there and then transfer it to mql.
Or as Maxim wrote aboveenter "http 401" into Yandex and it tells you everything in detail.
https://example-files.online-convert.com/audio/wav/example.wav
downloaded from here without any problems
and plays the sound
https://example-files.online-convert.com/audio/wav/example.wav
downloaded from here without any problems
And how playable is the downloaded file if PlaySound plays it immediately into the Files folder after downloading it? Add a couple of lines to the code and you can test it.
so it goes straight to theFiles folder andeverything works sound
------------------------------------------------------------------
that's how I did it.
♪ it downloads and plays right away ♪
so it goes straight to theFiles folder
To translate an HTTP request from curl options to WebRequest parameters, you have to:
1. in general, look at wikipedia to see how HTTP is structured
2. check in Curl documentation to see what options mean and why they are used
3. read the WebRequest help and see examples, even in this thread a lot
4. You should write code being aware of what you've done :-) what, why and why is it used.
You are obviously expecting all 4 points to be done for you. I understand it's weekend, time is short, and you have lots of ideas. It has to be quick.
But I still have to do it myself.
Maxim, ) Well, what's the point?
In curl there is only one parameter - "-u" is authorization or user, followed by apikey
In the WebRequest help file, you can figure out how to fill the resulting json array with yahoo finance response.
All the WebRequest examples in this thread are the one and only script in the help, which I posted the whole time )))).
Being aware of what has been done - it's hard to do without an example. Sites that commercially offer TTS have examples with .NET, Java, curl, mature programming languages, so to speak. They don't even have a clue about children like MQL.
So your post is important in theory, but insignificant in its usefulness.
Specifically, for me, for example, it's not clear where:
1) headers,
2) url or
3) somewhere else,
you need to specify the output to a wav file and I can't find examples, books that say this
Anyway, that's how it works.
only it's the wrong site.
so it goes straight to theFiles folder andeverything works sound
------------------------------------------------------------------
that's how I did it.
♪ it downloads and plays right away ♪