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

Crate doesn't build (want to pull request) #4

Closed
Unbreathable opened this issue Apr 1, 2024 · 3 comments
Closed

Crate doesn't build (want to pull request) #4

Unbreathable opened this issue Apr 1, 2024 · 3 comments

Comments

@Unbreathable
Copy link
Contributor

Unbreathable commented Apr 1, 2024

Hello, thanks for this amazing project!

I've just gotten started on developing a voice chat update for my app and thought this crate was a perfect fit. When importing it from Cargo, I got some errors though.

error[E0599]: no method named `with_model_from_memory` found for struct `SessionBuilder` in the current scope
  --> voice_activity_detector\src\vad.rs:36:14
   |
28 |           let session = Session::builder()
   |  _______________________-
29 | |             .unwrap()
30 | |             .with_optimization_level(GraphOptimizationLevel::Level3)
31 | |             .unwrap()
...  |
35 | |             .unwrap()
36 | |             .with_model_from_memory(MODEL)
   | |             -^^^^^^^^^^^^^^^^^^^^^^ help: there is a method with a similar name: `commit_from_memory`
   | |_____________|
   | 

error[E0599]: no method named `extract_tensor` found for reference `&Value` in the current scope
  --> voice_activity_detector\src\vad.rs:87:45
   |
87 |         let hn = outputs.get("hn").unwrap().extract_tensor::<f32>().unwrap();
   |                                             ^^^^^^^^^^^^^^ help: there is a method with a similar name: `try_extract_tensor`

error[E0599]: no method named `extract_tensor` found for reference `&Value` in the current scope
  --> voice_activity_detector\src\vad.rs:88:45
   |
88 |         let cn = outputs.get("cn").unwrap().extract_tensor::<f32>().unwrap();
   |                                             ^^^^^^^^^^^^^^ help: there is a method with a similar name: `try_extract_tensor`

error[E0599]: no method named `extract_tensor` found for reference `&Value` in the current scope
  --> voice_activity_detector\src\vad.rs:97:14
   |
94 |           let output = outputs
   |  ______________________-
95 | |             .get("output")
96 | |             .unwrap()
97 | |             .extract_tensor::<f32>()
   | |             -^^^^^^^^^^^^^^ help: there is a method with a similar name: `try_extract_tensor`
   | |_____________|
   | 

For more information about this error, try `rustc --explain E0599`.
error: could not compile `voice_activity_detector` (lib) due to 4 previous errors

I've already fixed them for me, but I want to contribute them back to here if you want me to do so, I mean all you really have to do is listen to Cargo here and everything will be fixed.

Let me know if I should make a pull requests,
Julian.

@Unbreathable Unbreathable changed the title There are some issues with your code Crate doesn't build (want to pull request) Apr 1, 2024
@Unbreathable
Copy link
Contributor Author

Since you literally just fixed it, this is kinda obsolete now. Anyway, thanks for your amazing library.

@nkeenan38
Copy link
Owner

Hey! Thanks for the find. Just an upgrade in the ort crate, which I guess is what happens when you rely on an alpha release. And I'm sorry. I should have read your message more carefully. I missed your contribution request until now. I'd be happy to have more contributors so if there is an issue you want fixed or a feature added in the future, don't hesitate to open a PR!

@Unbreathable
Copy link
Contributor Author

No problem, I'm a little new to all of this AI stuff though, so I won't exactly be able to contribute features or anything, but if you want me to I could provide an example of how to do real time voice activity detection using cpal since that's basically what the users of my app are already doing with your library. Been working great so far, we'll see how my friends like it and how it can be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants