Git Product home page Git Product logo

Comments (9)

dbartle avatar dbartle commented on May 26, 2024

You didn't mention what platform you're using to develop, or what you attempted. What isn't working?

Mac and Linux both have base64 conversion tools built-in to the command line, and there are many free utilities available online.

If that doesn't work, you will need to provide more information and we can determine if there is something wrong, otherwise we can't possibly help.

from rhino.

priyabhushansingh avatar priyabhushansingh commented on May 26, 2024

Hi @dbartle ,

I use Windows and have used online encoders to convert .rhn file to Base64.

Have got Clock_base64 from git which worked perfectly fine, after replacing that from my cutomised file in Base 64 format.
i got this error:
voice_widget.component.ts:121 Error: Failed to initialize rhino
at _callee$ (blob:http://localhost:4200/45740f8b-2efa-45a5-86a2-c75ac2c4ba92:1064)
at tryCatch (blob:http://localhost:4200/45740f8b-2efa-45a5-86a2-c75ac2c4ba92:71)
at Generator.invoke [as _invoke] (blob:http://localhost:4200/45740f8b-2efa-45a5-86a2-c75ac2c4ba92:301)
at Generator.next (blob:http://localhost:4200/45740f8b-2efa-45a5-86a2-c75ac2c4ba92:126)
at asyncGeneratorStep (blob:http://localhost:4200/45740f8b-2efa-45a5-86a2-c75ac2c4ba92:763)
at _next (blob:http://localhost:4200/45740f8b-2efa-45a5-86a2-c75ac2c4ba92:785)

Steps:

1.Generated context from console, Model worked fine there after it got trained.
2.Downloaded .rhn file.( was not in readable form)
3.used online encoder, selected downloaded .rhn file after encoding got Base64 of the file.
4. Replaced the base64 value to variable.

What format do i need to select, it doesnt seems to be UTF-8?
Any link , if you suggest for encoding with steps

from rhino.

dbartle avatar dbartle commented on May 26, 2024

A quick way to test if its working would be to take the clock .rhn file for wasm and use the same tool on it, since that file is a known quantity. The file is available here: https://github.com/Picovoice/rhino/blob/master/resources/contexts/wasm/clock_wasm.rhn

If you can point me towards the tool you used, I can try as well. Base64 is restricted to a subset of the ASCII character range, so I don't believe that would be an issue, but I could be wrong.

Was the .rhn file trained for the WebAssembly (WASM) platform in Picovoice Console?

from rhino.

priyabhushansingh avatar priyabhushansingh commented on May 26, 2024

Link used for encoding : https://www.base64encode.org/
Link used for training : https://console.picovoice.ai/rhn

Tried https://github.com/Picovoice/rhino/blob/master/resources/contexts/wasm/clock_wasm.rhn, No Luck :(

from rhino.

dbartle avatar dbartle commented on May 26, 2024

Was the .rhn file trained for the WebAssembly (WASM) platform in Picovoice Console? This is important!

from rhino.

priyabhushansingh avatar priyabhushansingh commented on May 26, 2024

No it was trained for Windows Platform.
Tried with WASM platform also, Still not working.

attaching both the .rhn file trained for WASM and trainer for Windows

from rhino.

dbartle avatar dbartle commented on May 26, 2024

It definitely won't work with Windows platform. Your application is not running on Windows, it's running on the web. It requires the WebAssembly version. This is clearly stated in the docs; https://picovoice.ai/docs/quick-start/rhino-angular/

The Alarm Clock was trained to understand a particular set of expressions. These are built using a simple grammar and grouped together into a YAML file. This file is trained by Picovoice Console to create a .rhn file for the WebAssembly (WASM) platform.

I was able to use that tool successfully to encode the file to base64. I did not change any of the default settings. You can validate this by matching its output against the source in the Angular demo. Get that part working, use the wasm version, and then everything should work.

from rhino.

dbartle avatar dbartle commented on May 26, 2024

Do not attach model files, as you do not have permission to redistribute them. If we need to do investigation on the files themselves, we can do that privately. But there is no apparent issue with that, but with however you are base64 encoding them. Get them to match and once you do that if you still have an issue, re-open.

from rhino.

priyabhushansingh avatar priyabhushansingh commented on May 26, 2024

The issue is not solved for me,

https://github.com/Picovoice/rhino/blob/master/resources/contexts/wasm/clock_wasm.rhn

This file itself it not working once encoded.

from rhino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.