and again dll and market - page 29

 

I've done the math:

The standard plan from IBM is $0.0214 per 1,000 characters. A million characters would be $21.4.

Google's is $4 per million characters.

//----------------------------------------------------------------

IBM's is more than 5 times more expensive. IBM must be attracting users with their charisma.)))

 
Реter Konow:

I've done the math:

The standard plan from IBM is $0.0214 per 1,000 characters. A million characters would be $21.4.

Google's is $4 per million characters.

//----------------------------------------------------------------

IBM's is more than 5 times more expensive. I guess IBM attracts users with their charisma.)))

There is a half-joking inside IBM: "Do you know why our company is called IBM? - International Business Machine? - No, Idiots Become Managers". )

Watson was introduced to the public with great pomp (it was then that I took its icon as an avatar) ) ), but it was of little use

https://spectrum.ieee.org/biomedical/diagnostics/how-ibm-watson-overpromised-and-underdelivered-on-ai-health-care

 
Nikolai Karetnikov:

There is a half-joking joke going around inside IBM: "Do you know why our company is called IBM? - International Business Machine? - No, Idiots Become Managers") )

Watson was presented to the public with great pomp (that's when I took its icon as an avatar) ) ), but it was of little use

https://spectrum.ieee.org/biomedical/diagnostics/how-ibm-watson-overpromised-and-underdelivered-on-ai-health-care

Funny joke)))) Yes, there's no other way to explain the bizarre rates.))
 
Nikolai Karetnikov:

...

Watson was introduced to the public with great pomp (that's when I took its icon as avatar ))) ), but it was of little use

https://spectrum.ieee.org/biomedical/diagnostics/how-ibm-watson-overpromised-and-underdelivered-on-ai-health-care

Great and very useful article for me. Thank you very much.

Now in general terms the global problem of AI and Watson(a) in particular is clear: nothing can think like a human being without having a human personality structure in all its complexity, contradiction and interaction with the world. Such a creation has no internal logical framework. It is spineless and amorphous within itself. There are no mental instances and their interconnections - everything is built on the bare statistics of collected data, bypassing the "twists" and "turns" of human nature. This is the dead-end way of AI. They will go no further than that.

In fact, the IBM Watson project maximised and exploited three basic things - gigantic computer processing power (supercomputer), the vast information base of the internet converted and structured into BZ, and the ingenious invention of an artificial neural network capable of "learning". On top of that they added a logic engine (NLP) and did a couple of other gimmicks. Next, they trained their monster.

But they haven't recreated the personality structure on which human thinking and the gigantic physical, emotional and mental world associated with it rests. And without that - Watson is a flawed and bloated mechanical function that will never get into the rhythm of human consciousness.

 
Реter Konow:

Great and very useful article for me. Thank you very much.

The global problem of AI and Watson(a) in particular is now broadly understood: nothing can think like a human being without having a human personality structure in all its complexity, contradiction and interaction with the world. Such a creation has no internal logical framework. It is spineless and amorphous within itself. There are no mental instances and their interconnections - everything is built on the bare statistics of collected data, bypassing the "twists" and "turns" of human nature. This is the dead-end way of AI. They will go no further than that.

In fact, the IBM Watson project maximised and exploited three basic things - gigantic computer processing power (supercomputer), the vast information base of the internet converted and structured into BZ, and the ingenious invention of an artificial neural network capable of "learning". On top of that they added a logic engine (NLP) and did a couple of other gimmicks. Next, they trained their monster.

But they haven't recreated the personality structure on which human thinking and the gigantic physical, emotional and mental world associated with it rests. And without that - Watson is a flawed and bloated mechanical function that will never get into the rhythm of human consciousness.

Please!

Not uninteresting considerations, though.

Tell me, do you actually deal with trading on the market?

 

continuing story

//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
#include <JAson.mqh>
void OnStart()
  {

   char    result[];
   char    post[];
   string  url="https://texttospeech.googleapis.com/v1/text:synthesize?key=AIzaSyCaLxPh84wXpLkT-zOE04MlvHj3JhLXU0w";
   string  headers;
   string  result_headers;
   int     status;
   
   
   string jsonbody;
   headers = "Content-Type: application/json";


  jsonbody = "{\"input\":{\"text\":\"one, two\"},\"voice\":{\"languageCode\":\"en-gb\",\"name\":\"en-GB-Wavenet-B\"},\"audioConfig\":{\"audioEncoding\":\"LINEAR16\"}}";  
  jsonbody = "{\"input\":{\"text\":\"раз, два\"},\"voice\":{\"languageCode\":\"ru-RU\",\"name\":\"ru-RU-Wavenet-B\"},\"audioConfig\":{\"audioEncoding\":\"LINEAR16\"}}";

 
   
  StringToCharArray(jsonbody,post,0,-1,CP_UTF8);
  ArrayResize(post, StringToCharArray(jsonbody,post) - 1);
  status=WebRequest("POST",url,headers,100000,post,result,result_headers);

   
   if(status==-1)
     {
      Print("Ошибка в WebRequest. Код ошибки  =",GetLastError());
      //---
      StringSetLength(url,StringFind(url,"/",8));
      MessageBox("Необходимо добавить адрес '"+url+"' в список разрешенных URL во вкладке 'Советники'","Ошибка",MB_ICONINFORMATION);
     }
   else
     {
      if(status==200)
        {
        CJAVal  CJasonResult;
        string lBase64String;
        char lBase64ResultArray[];
        char lBinaryDataArray[];
        char lkey[1];


        CJasonResult.Deserialize(result);
        lkey[0]=0;
        lBase64String = CJasonResult["audioContent"].ToStr();
        StringToCharArray(lBase64String,lBase64ResultArray,0,StringLen(lBase64String));
        CryptDecode(CRYPT_BASE64,lBase64ResultArray,lkey,lBinaryDataArray);
         //--- успешная загрузка
         PrintFormat("Файл успешно загружен, размер %d байт.",ArraySize(result));
         PrintFormat("Заголовки сервера: %s",result_headers);
         //--- сохраняем данные в файл
         int filehandle=FileOpen("result.wav",FILE_WRITE|FILE_BIN);
         if(filehandle!=INVALID_HANDLE)
           {
           
            //--- сохраняем содержимое массива result[] в файл
            FileWriteArray(filehandle,lBinaryDataArray,0,ArraySize(result));

            //--- закрываем файл
            FileClose(filehandle);
            PlaySound("\\Files\\result.wav");
           }
         else
            Print("Ошибка в FileOpen. Код ошибки =",GetLastError());
        }
      else
         PrintFormat("Ошибка загрузки '%s', код %d",url,status,result_headers);
     }
  }

Russian characters in json format seem to disappear when converted to char array. The result of the script is wavenet, the voice in which there is almost nothing left of the machine, says "comma". I.e. double-byte characters are completely ignored

 
Nikolai Karetnikov:

continued story

Russian characters in json format seem to vanish when converted to char array

The array is expectedly enlarged, compared to single-byte ANSI, but why are the values negative?

 
Nikolai Karetnikov:

story continued

russian characters in json file disappear when converted to char array

StringToShortArray(). Unicode in MQL

 
Ihor Herasko:

StringToShortArray(). Unicode in MQL anyway

Thank you, but you're missing my point )


 
Nikolai Karetnikov:

The array is expectedly larger than single-byte ANSI, but why are the values negative?

make the array uchar will be positive