程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

py2app: how to have Python script request permissions to access microphone?

发布于2025-01-02 16:58     阅读(920)     评论(0)     点赞(9)     收藏(5)


This line works fine when the Python script is run from the command-line:

recording = sounddevice.rec(duration * fs, samplerate=fs, channels=1, dtype='float64')

But when compiled with py2app, no sound is ever recorded. I suspect the issue is that the app is not asking the OS for permission to access the system microphone, but I can't figure out any way to trust the app or to force it to ask for permission.

Any ideas?


解决方案


暂无回答



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:https://www.pythonheidong.com/blog/article/2046700/afa1ac569c00b5045617/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

9 0
收藏该文
已收藏

评论内容:(最多支持255个字符)