2024年6月5日 星期三

pascal modi.dll ocr modidocument Microsoft Office Document Image Speech Synthesis & Speech Recognition Using SAPI Speech Recognition Troubleshooting

 
Inclua no uses: ComObj, MODI_TLB

Arraste um objeto MiDocView da guia ActiveX page para seu form.
Adicione um botão e um TMemo

No evento OnClick do botão inclua:

https://groups.google.com/g/dug-rs/c/0Gp2aLUt4y4?pli=1

procedure TForm.Button1Click(Sender: TObject);  
Var  
  doc :IDocument;  
  Img :IImage;  
  Layout :ILayout;  
begin  
  doc := IDispatch(CreateOleObject('MODI.Document')) as IDocument;  
  doc.create('c:\tela.bmp');  
  doc.OCR(miLANG_ENGLISH, true, true);  
  Img := IDispatch(doc.Images[0]) as IImage;  
  Layout := IDispatch(Img.Layout) as ILayout;  
  Memo1.Lines.Add(Layout.Text);  
  MiDocView1.Document := doc;  
  doc.Close(false);  
  Img := nil;  
  Layout := nil;  
end;
https://brislings69.rssing.com/chan-67590416/article67.html
 http://blog.dolba.net/k2club/entry/MODI_Story
procedure TForm.Button1Click(Sender: TObject);
 
Var
   doc: IDocument;
   Img: IImage;
   Layout: ILayout;
 
begin
   doc := IDispatch(CreateOleObject('MODI.Document')) as IDocument;
   doc.create(JvFileListBox1.FileName);
   doc.OCR(miLANG_ENGLISH, true, true);
   Img := IDispatch(doc.Images[0]) as IImage;
   Layout := IDispatch(Img.Layout) as ILayout;
   Memo1.Lines.Add(Layout.Text);
   MiDocView1.Document := doc;
   doc.Close(false);
   Img := nil;
   Layout := nil;
 
end;


procedure TForm.Button1Click(Sender: TObject); Var doc :IDocument; Img :IImage; Layout :ILayout; begin doc := IDispatch(CreateOleObject('MODI.Document')) as IDocument; doc.create(c:\test.bmp); doc.ocr(miLANG_ENGLISH,true,true); Img := IDispatch(doc.Images[0]) as IImage; Layout := IDispatch(Img.Layout) as ILayout; Memo1.Lines.Add(Layout.Text); MiDocView1.Document := doc; doc.Close(false); Img := nil; Layout := nil; end;






https://sourceforge.net/projects/jocr/

CreateOleObject  modi.dll
CreateOLEOBject('MODI.DOcument') 
CreateObject("MODI.Document") '


https://www.delphibasics.info/home/delphibasicssnippets/programmaticallytalkusingmicrosoftsam
uses

  COMobj

procedure TForm1.Button1Click(Sender: TObject);

var

  voice: OLEVariant;

begin

    voice := CreateOLEObject('SAPI.SpVoice');

    voice.Speak('This is Microsoft Sam saying Delphi Basics', 0);

end;

In a formless application:

program Project1;

uses

  COMobj,

  ActiveX;

var

  voice: OLEVariant;

begin

    if paramstr(1) = '' then exit;

    try

      CoInitialize(nil);

      voice := CreateOLEObject('SAPI.SpVoice');

      voice.Speak(paramstr(1), 0);

    Finally

      CoUnInitialize;

    end;

end.

https://stackoverflow.com/questions/3032739/delphi-sapi-text-to-speech

https://stackoverflow.com/questions/8073695/ms-sapi-sdk-equivalent-on-osx
https://members.embarcadero.com/login.aspx?returnURL=http://cc.embarcadero.com/download.aspx?id=27264

https://stackoverflow.com/questions/9729146/delphi-cant-import-sapi-5-1

http://blong.com/Conferences/DCon2002/Speech/SAPI4HighLevel/SAPI4.htm
Speech Synthesis & Speech Recognition Using SAPI 5.1
http://blong.com/Conferences/DCon2002/Speech/SAPI51/SAPI51.htm


https://www.codeproject.com/Articles/8443/A-Simple-Speech-Application-Using-SAPI-5-1-SDK