Coder Social home page Coder Social logo

Porcupine crash observed when multiple porcupine instances(handles) are used with multiple threads for keyword detection in multiple audio channels about porcupine HOT 6 CLOSED

picovoice avatar picovoice commented on September 26, 2024
Porcupine crash observed when multiple porcupine instances(handles) are used with multiple threads for keyword detection in multiple audio channels

from porcupine.

Comments (6)

arunnadesh avatar arunnadesh commented on September 26, 2024 3

Thanks for the response...I have already implemented the second solution... ☺️

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024 1

Hi Arun,

The stack trace is quite helpful. Thanks. The problem is that the math module is shared between different instances of the objects and when the first one quits it also releases resources acquired by math module. We need to do some reference counting here or give each instance a different instance of math module. I will add this to our TODO list and will push it out for next release. But it will take us a while to get to it considering other priorities.

In the meantime. I can think of a couple of things you can do to not get blocked:

1- Make a copy of .so for each thread (not nice) but works for sure.
2- Have a pool of Porcupine instances that you never delete (like ThreadPool but PorcupinePool!). Then you can assign them to new threads when you spawn them.

Let me know what you think.

Thanks a lot for helping us make Porcupine a better library.

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024 1

Hi Arun,

Could you please check and see if the issue is resolved in v1.3?

Thanks

from porcupine.

arunnadesh avatar arunnadesh commented on September 26, 2024

Thanks... I will check and update...

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

any updates?

from porcupine.

kenarsa avatar kenarsa commented on September 26, 2024

closing due to inactivity. feel free to reopen if the issue is not resolved.

from porcupine.

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.