Mac OS Ventura does not request microphone permission from pyaudio - pyaudio

I have written a program in Python with pyaudio which requires microphone access. The program works perfectly when launched from the terminal but when it is bundled up as an app with py2app it does not request microphone permission when I launch it.
Before I upgraded my mac to Ventura, finder would always ask permission to access he microphone.
Can anyone suggest a hack to fix this problem.
Obviouly I have tried turning on microphone access in Privacy and Security Settings, but since Ventura does not recognise that my app wants microphone access it does not appear in the microphone access settings.
As soon as my code runs it requests audio access.
# Get audio parameters
devices = fn.get_device_list()
p = pyaudio.PyAudio()
audio_format = pyaudio.paInt16
device_channels = devices[device]['maxInputChannels']
# Open the selected audio input device
stream = p.open(
format=audio_format,
channels=device_channels,
rate=sample_rate,
input=True,
output=False,
input_device_index=device,
frames_per_buffer=chunk_size)

Related

How to use "telemetry.cfg" and ".telemetry.cfg" files with Adobe Scout

In the simplest language possible, can someone please explain...
the function of the "telemetry.cfg" file when debugging an application with Adobe Scout?
the function of the ".telemetry.cfg" file when debugging an application with Adobe Scout?
what TelemetryAddress is needed in each file
The only information I've found describing their functionality is very limited and I'm having trouble wrapping my head around these concepts.
Some notes for reference...
Example of "telemetry.cfg" file contents ("172.30.124.81" is the local IP of the machine running Scout):
TelemetryAddress = 172.30.124.81:7934
SamplerEnabled = false
CPUCapture = false
DisplayObjectCapture = false
Stage3DCapture = false
ScriptObjectAllocationTraces = false
And ".telemetry.cfg" could be the same except:
TelemetryAddress = localhost:7934
I've read this to be true:
7934 - Scout's default port
7935 - Flash Builder's default port
Please don't just post a link to the official Adobe documentation; I've read it numerous times.
The .telemetry.cfg and telemetry.cfg file formats are the same.
Either one is only used when enabling Scout options to profile a swf in a remote process (i.e. on a different PC). This configuration file is located on the PC that is running the swf in order to tell the Flash runtime where to send its telemetry data and which data that it should send.
There is an iOS & Android app for configuring AIR on the actual mobile devices and thus the telemetry.cfg/.telemetry.cfg file is not used.
telemetry.cfg is used to config Air (via FlashBuilder) for profiling Blackberry 10s over their USB connection. Same options in the '.telemetry.cfg', just the IP is a link-local IPv4 address (169.254.x.x). Blackberry 10s are at end of life for support for AIR and I personally have not developed for them.
So in the Scout preferences:
You can change the port number that Scout uses, and this port number has to match the one used in the .telemetry.cfg that is located on the remote PC.
The "Make the Flash Runtime on thus computer connect to Scout" option actually creates a temporary ./telemetry.cfg that exists only while Scout run and is picked up by the Flash runtimes/SWFs that you run so profiling is automatic.
TelemetryAddress in the file is the IP (or host name) of the PC that is running Scout and the port address has to match the one assigned in the Scout Preferences (default is 7934)

Error #Unhandled securityError accessing https://accounts.google.com

I am trying to write a use-anywhere (web, air, mobile) OAuth library for AS3 that is flexible enough to use with any OAuth site or near OAuth.
My sample app I am writing authenticates with Google and I want to write an app that uses google drive.
At the moment the Air and mobile apps work fine but the web flash player app keeps giving me this error:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://localhost:81/OAuthWebExample.swf cannot load data from https://accounts.google.com/o/oauth2/token.
(I get the same error when on a non-localhost domain on port 80)
I have looked at https://accounts.google.com/crossdomain.xml which has:
<site-control permitted-cross-domain-policies="by-content-type" />
I am not sure what that means...
I am pretty sure that it is possible to get flash to talk to these google APIs. What can I do to get this to work?
(I'm not interested in the "work round" where you use feedburner or something similar to proxy these calls thanks).
I have looked at https://accounts.google.com/crossdomain.xml
It's the master policy file and it doesn't grant permissions to the content of accounts.google.com domain (there isn't allow-access-from nodes withing it), so flash player fires securityError
I am not sure what that means...
It means:
by-content-type: [HTTP/HTTPS only] Only policy files served with
Content-Type: text/x-cross-domain-policy are allowed
So it seems it's designed for sub-domain services and child crossdomain.xml files so you can't load data directly from accounts.google.com. I found the same issue with Google OAuth for flash Google Oauth crossdomain.xml problem with Flex and they have to use old AuthSub (it uses accounts.googleapis.com with proper crossdomain.xml) to solve the auth problem and it seem nothing were changed for the past two years.
Check the Flash player security on compile, local or external.
The AIR applications can connect to external and local files, but a embedded swf can't do it
https://www.adobe.com/security/flashplayer/articles/localcontent/

WebRtc2SIP: No video is been received/transmitted when made call between chrome and a SIP client

I am a newbie to webrtc2sip. I have setup my webrtc2sip gateway and registered to sip2sip.info as my domain. The problem is when I make video calls from chrome to any SIP client(ekiga/jitsi) the call gets connected but I am unable to see videos on both the sides.
==================================================================================
Case 1: Chrome calls SIP client
Result: No video shown on both transmit and receive side
==================================================================================
On the chrome JS console it says that :
State machine: tsip_dialog_register_InProgress_2_Connected_X_2xx SIPml-api.js?svn=179:1
==session event = m_stream_video_local_added SIPml-api.js?svn=179:1
==session event = m_stream_video_remote_added SIPml-api.js?svn=179:1
==session event = m_stream_audio_local_added SIPml-api.js?svn=179:1
==session event = m_stream_audio_remote_added SIPml-api.js?svn=179:1
I have attached the JS console logs(case1_web2SIPClient_JSLogs.txt), wireshark trace(case1_web2SIPClient_WStrace.pcap) , webrtc2sip gateway console logs(case1_web2SIPClient_gatewayLogs.txt), sipml5 expert settings (Expert_settings.png) and config.xml (config.xml) for this case. I did not change anything in the config.xml that was generated after i built the source as mentioned in the instructions of this page (http://linux.autostatic.com/installing-webrtc2sip-on-ubuntu-1204).
I gave a try making calls between chrome and a android SIP client (CSipSimple) and the problem remains the same.
==================================================================================
case 2: SIP client calling chrome.
Result: as soon as I click answer button on chrome, the calls gets rejected.
==================================================================================
The JS console logs states that:
State machine: tsip_transac_ist_Proceeding_2_Completed_X_300_to_699 SIPml-api.js?svn=179:1
SEND: SIP/2.0 603 Failed to get local SDP
Via: SIP/2.0/WS 172.21.128.118:10060;rport=10060;branch=z9hG4bK-1441398960
From: <sip:tata#172.21.229.127>;tag=300647977
To: <sip:amshyam320#sip2sip.info>;tag=ZxQFfM7fIIP3rT1HINzb
Call-ID: fbdf5a11-ff9e-0072-fa8b-09525220cec6
CSeq: 1670757835 INVITE
Content-Length: 0
Reason: SIP; cause=603; text="Failed to get local SDP"
For this case I am attaching JS logs(case2_SIPClient2WebJSLogs.txt), wireshark dump(case2_jitsiToWeb_WStrace.pcap)
Configuration:
Chrome Version: checked on 30.0.1599.114 and even on Latest chrome version
Webrtc2sip version: 2.6.0
sipml5 Version: svn=203
ubuntu version: 12.04 (checked on both desktop and server editions)
Am I missing something in my setup or configuration please guide and help in moving further.
Thanks,
Shyam
Case2:
You're using RTCWeb-capable browser(Chrome) and trying to call a SIP client which may not be implementing some mandatory features like ICE,SRTP. Chrome uses SRTP-SDES and Firefox uses SRTP-DTLS.
Enable RTCWeb Breaker in sipml5 expert settings and check.
The RTCWeb Breaker is used to enable audio and video transcoding when the endpoints do not support the same codecs or the remote server is not RTCWeb-compliant.
Case:1:
Is audio working? and I can't see your logs.

Unable to Launch Chrome Browser in Selenium

I am launching chrome browser using
selenium = new DefaultSelenium("localhost", 4444, "*googlechrome",
"https://example.com/");
But i get a popup with following message and it freezes:
An administrator has installed Google Chrome on this system, and it is available for all users. The system-level Google Chrome will replace your user-level installation now.
Console Log till point of freeze:
Server started
16:06:37.792 INFO - Command request: getNewBrowserSession[*googlechrome, https://example.com/, ] on session null
16:06:37.796 INFO - creating new remote session
16:06:38.081 INFO - Allocated session beb925cd0418412dbe6319fedfb28614 for https://example.com/, launching...
16:06:38.082 INFO - Launching Google Chrome...
Any suggestions?
Try giving location of your chrome exe too along with browser name like this :
selenium=new DefaultSelenium("localhost", 4444, "*googlechrome C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe", "https://example.com");

Sniffing for WOL packets on port 9

So I am using XBMC (a media center program) that has an Android app with a feature that allows you to send Wake on LAN "magic packets" to computers you have XBMC installed on. While this would be a great feature for me if I had a dedicated media PC that auto-ran XBMC on startup, I use it instead on my normal desktop PC.
What I would like to do is see if I can write a little listener script that would run on my PC that would listen for those magic packets sent over port 9 and just start the XBMC application.
Some of my friends say that you cannot listen on this port. The Google searches on "port 9", "wake on lan", and "simple TCP/IP" I've performed remain inconclusive as to weather or not this is possible.
With Python and pcap (winpcap and pypcap http://code.google.com/p/pypcap/). Not very nice but works for me.
import os, pcap
pc = pcap.pcap()
pc.setfilter('udp port 9 and (udp[8:4] == 0xFFFFFFFF and udp[12:2] == 0xFFFF)')
for ts, pkt in pc:
os.system(r'"C:\Program Files (x86)\XBMC\xbmc.exe"')
You should be able to do this on a Windows PC. However your program will not run on a *Nix style system without having superuser, or using a privilege escalator program like jsvc.