AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Too bad the support in the bluetooth stack isn't there (yet). I came here with the same problem with my Poly Voyager Focus UC. T_btn = tk.Button(text='Switch Mic On', width=15, command=toggle) # Define the path for the script below, e.g.,Ī list default argument has a fixed address Tkinter toggle button to switch microphone On/Off using a script Press it again, and you come back to 'Switch Mic On' with high-quality audio but the microphone in the headset is off. Press it and it will switch to 'Switch Mic Off' and you're now with the headset microphone on and the low-quality audio. It creates a window with a single button written 'Switch Mic On'. I wrote a simple GUI with a toggle button, to be used together with the one from Ondra Žižka's: # Script to monitor plugged earphones and switch when unplugged (Ubuntu does that, but nice script): Pacmd set-default-source "$SOURCE_NAME" || echo 'Try `pacmd list-sources`.' #SOURCE_NAME="bluez_sink.00_19_5D_25_6F_6C.a2dp_sink.monitor"Įcho "Switching audio input to $SOURCE_NAME" If then echo "F5A phones not found" exit fi If $(echo "$LINE" | grep $SINK_NAME &> /dev/null) thenĮcho "Detected quality sound output, that means we can't speak switch that."Įcho "Quality sound not found, switch to the good sound." If then echo "F5A headset not found" exit fi LINE=`pacmd list-sinks | grep '\(name:\|alias\)' | grep -B1 F5A | head -1` Sudo rfkill block bluetooth & sleep 0.1 & sudo rfkill unblock bluetooth It is not polished, has some dead code, and I use my own phones ID's, but it may be an inspiration for your own script. So I wrote this script leveraging pacmd which toggles between the 2 modes: For few days, I was switching between the two modes using Ubuntu's sound settings dialog, but that's really, really annoying as you can imagine. Still, listening to a French guy over Hz audio wasn't really the right way to have a meeting. I was about to return the headset and wait for Bluetooth 5.0 headset, but then realized, that's the best functionality I can get with my BT 4.0 laptop. The problem here is not that the microphone does not work, but rather that the audio quality worsens when it is activated. Headset-input: Headset (priority: 0, latency offset: 0 usec) Part of profile(s): a2dp_sink, headset_head_unit Headset-output: Headset (priority: 0, latency offset: 0 usec, available) Off: Off (sinks: 0, sources: 0, priority: 0, available: yes) Headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: yes) Ubuntu 17.10, no sound customization IIRC, everything latest.īluez.path = "/org/bluez/hci0/dev_00_19_5D_25_6F_6C"ĭevice.icon_name = "audio-headset-bluetooth"Ī2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 10, available: yes) How could I simplify switching between the profiles so that it is HFS/HFP when I talk and A2DP when I listen? E.g. I've read few of other questions and seems A2DP is expected not to support input, right? But the HFP part in HFS/HFP is High Fidelity Playback I guess? That sounds like it could work as a headset and still not sound like 1950's phone. When I switch it back to A2DP, the input is back to desktop mic. When I want to switch audio input to the headset's microphone, the output profile automatically changes to Headset Head Unit (HFS/HFP) and the quality is terrible - like 8bit sound or something. It plays nicely with High Fidelity Playback (A2DP sink) profile. Bluetooth 4.0, profiles: Headset, Hands free, A2DP, AVRCP/HSP/HFP
0 Comments
Read More
Leave a Reply. |