DelphiWorlds / Kastri

Cross-platform library for Delphi
MIT License
488 stars 118 forks source link

Speech framework is not installed with SDK but Kastri need it #34

Closed Fossy01 closed 3 years ago

Fossy01 commented 3 years ago

[Speech] is needed by Kastri, but in the SDK is not installed

Hello:

When I compile SpeechRecognition Demo, I get: [DCC Error] E2597 ld: file not found: /System/Library/Frameworks/Speech.framework/Speech

This is because iOS SDK (12.0, 12.1, 14.2 and 14.3) not install Speech framework (not exists) and I can't compile the Demo.

Delphi Version: 10.3 Platform(s) that the issue occurs on (i.e. iOS, Android etc): iOS (14.2 and 14.3 SDK)

Concise steps to reproduce the behaviour: Simply open SpeechRecognition Demo and compile it for iOS (on Mac Mini, with PAServer-20.0 correctly running, configured and linked to Embarcadero Delphi).

Please how I can fix this issue? Thanks. Jose.

DelphiWorlds commented 3 years ago

You need to add the Speech framework using the Delphi SDK Manager. This article shows how... is a little old, however the process is pretty much the same:

https://delphiworlds.com/2013/10/adding-other-ios-frameworks-to-the-sdk-manager/

Fossy01 commented 3 years ago

Thank you very much!!!

Adding framework manually solved the error.

Now I'm having oher error ([DCC Error] E2597 ld: file too small (length=0) for architecture arm64), but I think that is a problem of Firemonkey. I'm trying to search about this issue but only have found that this problem is with Debug mode. I changed to Release but problem persists.

Thank you for all!! Jose.

DelphiWorlds commented 3 years ago

([DCC Error] E2597 ld: file too small (length=0) for architecture arm64)

This is due to a problem with PAServer. You need to:

  1. Ensure you have all the latest patches installed in Delphi. This also means installing the updated PAServer. When it runs, the version number should read: 12.1.10.5

  2. On the Mac, delete the folders with names starting with cache-dir, under the /Users/(username)/PAServer/scratch-dir folder

  3. On the Windows machine, delete the iPhoneOSxx.x.sdk folder where xx.x is the SDK version

  4. In Delphi SDK manager, select the iOS SDK and click the Update Local File Cache button

Fossy01 commented 3 years ago

Thank you very mucho for your support!!, I'm very very grateful for your help.

I can't find how update (or patch) PAServer or Delphi Community Edition 10.3.3. Really is an fresh install (installed 3 days ago), but I think that it must be patched.

This is the list of patches for 10.3.3, but I can't find the PAServer patch or update: https://blogs.embarcadero.com/rad-studio-delphi-and-c-builder-10-3-3-list-of-patches/

Don't worry, I will find the solution :-)

I want to ask you other thing about Speech:

FSpeech.StartRecording init the voice record and it stops when silence detect, and finally we can get text of all words or phrases that we have said..., Ok..., Is there any way that phone can listening and writing words in real time?

I want program an App (words game) that work with vocal commands, and for that I need sometimes that App is listening, and need get in real time the words in order to discriminate the words that trigger an action in the game.

It's possible?

Thank you very much!! At. Jose.

DelphiWorlds commented 3 years ago

If you have 10.3.3, I'm afraid you are out of luck. Using the later iOS SDKs (iOS 14.x) needs Delphi 10.4.1

Is there any way that phone can listening and writing words in real time?

It already does that. In the demo the SpeechTextHandler method on the main form is called in "real time" as text is recognised

I want program an App (words game) that work with vocal commands

You might be able to use it this way - in fact I had a plan to do something similar.