CodeYan01 / vosk4delphi

Delphi bindings for the speech recognition library vosk-api
Apache License 2.0
1 stars 0 forks source link

VoskModel not yet initialized #1

Open xelnaga64 opened 1 month ago

xelnaga64 commented 1 month ago

Hello,

Thank you for the project. I downloaded "vosk-model-small-en-us-0.15" and DLL files (vosk-win64-0.3.45).

var
  Form1: TForm1;
  FModel: TVoskModel;
  FRecognizer: TVoskRecognizer;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
  FModel:=TVoskModel.Create(self,'vosk-model-en-us-0.22-lgraph');
  FRecognizer:=TVoskRecognizer.Create(self,FModel);
end;

However I receive this error message: VoskModel not yet initialized.

Any suggestions?

CodeYan01 commented 1 month ago

You said you downloaded "vosk-model-small-en-us-0.15" but the filename you put in TVoskModel.Create is different. if I'm not mistaken, it should be the same folder name

xelnaga64 commented 1 month ago

Sorry about that. No matter what model I test, I get the same error. I use Delphi 10.3. Maybe there is some incompatibility with the code.