Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheetah Issue: cheetah_params.pv picovoice File is <!-- while library is '2.0' #335

Closed
2 tasks done
AbsurdSyssie opened this issue Aug 18, 2024 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@AbsurdSyssie
Copy link

Have you checked the docs and existing issues?

  • I have read all of the relevant Picovoice Cheetah docs
  • I have searched the existing issues for Cheetah

SDK

React

Cheetah package version

2.0.0

Framework version

react 18 Node.js v20.13.1.

Platform

Windows (x86_64)

OS/Browser version

Windows 11

Describe the bug

Attempting to use cheetah STT in react 18.
Downloaded latest cheetah_params.pv, placed in /public/models folder.
Used npm install for the relevant libraries.
Set up cheetah init with my access key and the correct path to the cheetah params.
On initiation get the error
CheetahInvalidArgumentError: Initialization failed: [0] Cheetah model (.pv) file belongs to a different version of the library. File is <!-- while library is 2.0.0. [1] Picovoice Error (code 00000136)

Steps To Reproduce

npm install @picovoice/cheetah-react @picovoice/web-voice-processor
Downlod cheetah_params.pv from the github repo
Reference cheetah_params in the init function
const initEngine = async () => {
console.log("Initializing Cheetah with model_params.");

try {
  await init("access_key", {
    cheetahModel: "models/cheetah_params.pv",
  });
  console.log("Cheetah initialized successfully.");
} catch (error) {
  console.error("Error initializing Cheetah:", error.message);
}

};

Also tried with base 64 option.

Use voice widget, on initialisation get the above error.

Expected Behavior

On pressing initialise should load the params and carry out stt function.

@AbsurdSyssie AbsurdSyssie added the bug Something isn't working label Aug 18, 2024
@AbsurdSyssie
Copy link
Author

Also attempted to use the demo from this page https://picovoice.ai/docs/quick-start/cheetah-react/
Get an error;
npm run start

[email protected] start
node scripts/run_demo.js start

node:internal/child_process:421
throw new ErrnoException(err, 'spawn');
^

Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:761:9)
at Object.fork (node:child_process:172:10)
at Object. (C:\Users\Oscar\Python_Projects\cheetah_test\cheetah\demo\react\scripts\run_demo.js:40:15)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
errno: -4071,
code: 'EINVAL',
syscall: 'spawn'
}

Node.js v20.13.1
PS C:\Users\Oscar\Python_Projects\cheetah_test\cheetah\demo\react> npm run start

[email protected] start
node scripts/run_demo.js start

node:internal/child_process:421
throw new ErrnoException(err, 'spawn');
^

Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:421:11)
at spawn (node:child_process:761:9)
at Object.fork (node:child_process:172:10)
at Object. (C:\Users\Oscar\Python_Projects\cheetah_test\cheetah\demo\react\scripts\run_demo.js:40:15)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
errno: -4071,
code: 'EINVAL',
syscall: 'spawn'
}

Node.js v20.13.1

@laves
Copy link
Member

laves commented Aug 19, 2024

@AbsurdSyssie - thanks for the report. The spawn EINVAL error you received with the React demo was a real issue with our launch script running on the latest Node 20 on Windows. We've addressed that with #336.

As for your initial issue - can you reproduce it using the demo (now that we've fixed the launch script)? We generally prefer addressing issues using our demos as shared code to rule out any issues with user code.

@laves
Copy link
Member

laves commented Sep 27, 2024

Closed due to inactivity

@laves laves closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants