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

Can't open temp files #71

Open
beto-aveiga opened this issue Apr 15, 2022 · 3 comments
Open

Can't open temp files #71

beto-aveiga opened this issue Apr 15, 2022 · 3 comments

Comments

@beto-aveiga
Copy link

Hi! This issue is weird and I don't know where to begin.

The problem is that voice2json can't read temporary files.

This might be not an issue of voice2json but I just don't have a clue.

I run voice2json through docker. I'm using ubuntu 21.

In the graphic below I first run aplay with the audio file and works, then I run voice2json and it can't find the file.

image

If the audio file is in my home directory, the file is played 🤷🏼

I set the permissions for the audio file to 777, but that didn't work either.

Any help is welcome.

Thanks for your great work, voice2json is awesome.

@synesthesiam
Copy link
Owner

You're welcome! This is a Docker issue. I think you have to pass --tmpfs /tmp to the docker run command, otherwise it creates it's own private copy of /tmp.

@beto-aveiga
Copy link
Author

You were right on the issue, however, this is what worked for me:

docker run -i \
       --init \
       -v /tmp:/tmp  \
       -v "${HOME}:${HOME}" \
       -v "/dev/shm/:/dev/shm/" \
       -w "$(pwd)" \
       -e "HOME=${HOME}" \
       --user "$(id -u):$(id -g)" \
       synesthesiam/voice2json "$@"

Notice the -v /tmp:/tmp.

It happened to me first when I tried the recipe launch_program.
Do you think this should be fixed on the docs? Or in the recipe?
If it is just updating the docs, I can create a PR if it makes sense.

Thanks!

@synesthesiam
Copy link
Owner

Sure, I'd appreciate a PR 👍
Thanks!

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