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

Problems with porcupine_params_it.pv model #1347

Open
2 tasks done
Jonny-T-cyber opened this issue Jan 3, 2025 · 3 comments
Open
2 tasks done

Problems with porcupine_params_it.pv model #1347

Jonny-T-cyber opened this issue Jan 3, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Jonny-T-cyber
Copy link

Have you checked the docs and existing issues?

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

SDK

Python

Porcupine package version

3.0.3

Framework version

Python 3.12.4

Platform

Windows (x86_64)

OS/Browser version

Windows 11

Describe the bug

I downloaded the porcupine_params_it.pv model at the following link:
https://github.com/Picovoice/porcupine/blob/master/lib/common/porcupine_params_it.pv

At runtime I get the error:

raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]( pvrhino._rhino.RhinoInvalidArgumentError: Initialization failed: [0] Context file (.rhn) and model file (.pv) should belong to the same language. File belongs to 'it' while model file (.pv) belongs to 'en'

I downloaded the file again, but the same error persists.
It seems as though the file is associated with the English language instead of Italian.
Interestingly, files for other languages are recognized correctly.

In fact, for example with the files

  • porcupine_params_fr.pv (in French)
  • porcupine_params_es.pv (in Spanish)

At runtime I receive, respectively:

raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]( pvrhino._rhino.RhinoInvalidArgumentError: Initialization failed: [0] Context file (.rhn) and model file (.pv) should belong to the same language. File belongs to 'it' while model file (.pv) belongs to 'fr'

and

raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]( pvrhino._rhino.RhinoInvalidArgumentError: Initialization failed: [0] Context file (.rhn) and model file (.pv) should belong to the same language. File belongs to 'it' while model file (.pv) belongs to 'es'

Steps To Reproduce

  1. Download the .pv model file for the Italian language from the Picovoice Console.
  2. Place the file in the appropriate directory of the project (e.g., models/).
  3. Run the Python script configured to use the Italian .pv file.

Expected Behavior

The script should initialize without errors, recognizing the .pv file as associated with the Italian language.

@Jonny-T-cyber Jonny-T-cyber added the bug Something isn't working label Jan 3, 2025
@matt200-ok
Copy link
Contributor

Hello @Jonny-T-cyber, It looks like the issue is a mismatch with Rhino not Porcupine. You should verify that both your Rhino model file and Rhino context file are in Italian.

@Jonny-T-cyber
Copy link
Author

Hello @matt200-ok,
I apologize, but I didn’t quite understand your message. Could you kindly clarify what steps I should take?

Let me try to explain the situation more clearly:

Based on the error message:

"File belongs to 'it' while model file (.pv) belongs to 'en'":

  • File belongs to 'it': This refers to the .rhn file, which is correctly recognized as Italian.
  • model file (.pv) belongs to 'en': This refers to the .pv file, which is mistakenly recognized as English, even though the file name clearly specifies "_it" (e.g., porcupine_params_it.pv).

When I use the other two .pv files, I still encounter an error because they are not intended for Italian. However, these files are correctly recognized in their respective languages (French and Spanish).

Could you please confirm what I should do to resolve this issue?

Thank you for your assistance.

Best regards

@matt200-ok matt200-ok self-assigned this Jan 6, 2025
@matt200-ok
Copy link
Contributor

Hello @Jonny-T-cyber, Rhino also requires a pv file. Based on the error message you have provided it looks like the Rhino pv file is in English while the rhn file is in Italian.

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