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

Running pyo in a headless server mode #268

Open
lextoumbourou opened this issue May 16, 2023 · 1 comment
Open

Running pyo in a headless server mode #268

lextoumbourou opened this issue May 16, 2023 · 1 comment

Comments

@lextoumbourou
Copy link

lextoumbourou commented May 16, 2023

Hi there,

Thanks a lot for pyo.

We are hoping to use pyo as a headless server, which would apply a bunch of effects to audio files when a user requests via an API call.

However, we are intermittently (around 10% of the time) receiving silent audio back from pyo.

We're pretty convinced that the issue is that we need to sleep for a variable amount of time between server.start() calls and server.stop(). However, the exact time is unclear. 5 seconds seems to decrease the rate of silence, although it doesn't give a 100% guarantee. Also, ideally, this API would be much faster than 5 seconds per request.

So my question is: is there any way to check if pyo is still processing before calling stop()? Or if not, would it be technically feasible to add as a feature?

Maybe a better question is: does pyo support running on a headless server like this? Is it recommended?

@belangeo
Copy link
Owner

belangeo commented Jan 5, 2024

I think what want to do is to run the Server in "offline" mode (compute as quick as possible). See the "audio" argument of the Server:

https://belangeo.github.io/pyo/api/classes/server.html

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