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

Play camera.wav sound when taking photo #6

Open
KsmoinO opened this issue May 1, 2018 · 2 comments
Open

Play camera.wav sound when taking photo #6

KsmoinO opened this issue May 1, 2018 · 2 comments

Comments

@KsmoinO
Copy link

KsmoinO commented May 1, 2018

In order to play the camera.wav file when taking photo you should a this line @251:

250     CAMERA.annotate_text = ''
251     os.system('aplay ' + REAL_PATH + '/assets/camera.wav &')
252     CAMERA.capture(filename)
@jibbius
Copy link
Owner

jibbius commented May 1, 2018

Ooops, I hadn't intended on including that .wav file yet! 😬

I have been looking at solution using PyAudio, here: https://gist.github.com/jibbius/97dfb8d051c7c462051262a75cb02dbe

The suggestion you've provided looks to be much simpler, however.
I'll do some further testing, and might end up adopting this approach.
Thanks again.

@KsmoinO
Copy link
Author

KsmoinO commented May 4, 2018

My approach is more a system one because i am more of sysadmin 😄
Although it is simple, syscalls are dangerous and should be avoided if possible.
Your code should do that 😉

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