DIY Google home using PC and BT speaker with mic - python-3.x

I have this BT speaker , with in built mic , http://www.intex.in/speakers/bluetooth-speakers/it-11s-bt
i want to build something like google home with it , using python .Please guide me.

There seems to be a lot of issues with using a bluetooth speaker & mic combo on the raspberry pi. Most people have an issue getting the mic to work. This thread discusses some of the issues. This extensive post describes needing a bluetooth dongle
You may be better off using it as a speaker and then buying a separate mic.
Then just connect the blutooth speaker to the pi (from the top right of the screen) and plug in the microphone and run through this tutorial.

I've read a couple articles and comments that suggest the reason why bluetooth is not an ideal setup is because BT and WIFI both use the same 2.4 Ghz band and slow each other down / disconnect when used simultaneously. My advice would be to do what I did: run a usb mic with an extension cable from inside a cabinet or entertainment unit and connect it to your audio system or run a 3.5 mm headphone jack extension too.
I've been writing a tutorial that is for beginners and is super easy to follow. All the steps to get it up and running (step 3) and monitor-free (step 4) are there.
I'll be working on it throughout the summer, adding the LED support, similar to G Home. Best of luck!

Related

What language/libraries best for BLE connectivity?

Operating system: MacOS
Just for some context on what I am trying to do, I have an Ikea standing desk which has bluetooth. I am able to control the desk with a built in app. I want to create a server running on a raspberry pi that connects to desk and controls it, I then want to create an Alexa skill which will control the desk by calling the server endpoints.
What's the best language/library you would suggest I use? Ideally something that would run on MacOS and Ubuntu.
I don't know anything about BLE yet which is why it is hard for me to find a good answer. If you have resources, books or tutorials that will help me get running with BLE please recommend them.
My use case:
Get desk to go up
Get desk to go down
Get current position of desk
If you want to write one app that works for both MacOS and Ubuntu then as ukBaz said, python and Bleak are your best options. If you want to use the native way of writing BLE apps for each OS, then you can use CoreBluetooth on MacOS and BlueZ on Ubuntu. The advantage of the former is that you can get an application up and running quickly, and the advantage of the latter is that you will find a lot more resources and advanced functionality.
Below are some resources that can help you in your development:-
Theoretical Bluetooth:
Bluetooth Low Energy: A Primer
Getting Started with Bluetooth Low Energy
Ellisys Bluetooth Series
CoreBluetooth
Getting Started with CoreBluetooth
Ultimate Guide to Apple's CoreBluetooth
iOS App Full Example
BlueZ
Configuring Bluetooth devices with bluetoothctl
Ubuntu: Accessing GATT services
Python
Ikea IDÅSEN desk API and CLI
Idasen controller example
Using Python for Bluetooth

Raspberry's sound Bug with a bluetooth headphone

everybody!
I'm trying to connect my raspberry pi 3 bluetooth to my headset. However the sound bug. It's kind of intermittently cutting off quite randomly, which makes it sound terrible.
I'm using the Raspberry 3's built-in bluetooth with Pulseaudio on Raspberry Pi OS V4.19.
How do I fix it?
This sounds like the known issue. You might want to follow some of the issues that are open around this topic:
https://github.com/Arkq/bluez-alsa/issues/60
https://github.com/raspberrypi/linux/issues/1552
https://github.com/balenalabs/balena-sound/issues/62

wireless transfer of data from raspberry pi 3 to pc using python

I am doing my master thesis and one of the important things for me is to transfer the recordings of pressure and temperature from a patient simulator to a PC. From the sensors, the information is taken by the raspberry pi3. I am using raspberry pi3 because it has inbuilt wifi option. Now I have to transfer the data from the raspberry pi to the PC wirelessly using python programming. I am new to python and I have absolutely no idea how to do this. Could anyone help me with writing the code so that I could at least send some data from where I could adjust the bit rate and other things according to my requirements?
Take a look at sockets, a simple client - server communication is really easy to do :)
https://wiki.python.org/moin/TcpCommunication

Bluetooth A2DP SINK in Windows 8.1

I know Microsoft doesn't allow the streaming of music from phones to Windows 8 PC's or the use of the PC as hands free, but has anyone found a way around this yet?
Are there any modified drivers or ways to modify the current drivers?
Any help would be appreciated.
www.bluesoleil.com offer a custom bluetooth driver that will make your pc show up as a Bluetooth headset to other devices. It will also allow you to choose which audio device the audio is repeated repeat to.
Product is not free but is the only solution is managed to find after half an afternoon looking. Works great as well.

DAC pops on Song Start/Stop in Raspbian

This has been a plaguing issue for the Raspberry Pi install of Raspbian (Debian Wheezy) since it was first built. Talking directly to the Raspberry Pi foundation and the Raspbian team has given me no luck.
The issue itself is that the DAC doesn't initialize until it starts playing a song. It then will turn itself off when done, causing another pop. When using this for a pure music player it is infuriating to say the least, especially when the pop is loud.
I have heard this on VLC, MOCP and MPD. This has been covered in the Pi forums, but no answers are found: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=8783
I turn to you at Stack Overflow to see if there is a way to solve this issue. My idea is to initialize it at start-up so the pop only happens when it boots up, though I don't know how to control the ALSA to do that.
Hopefully a solution can be found.
Thanks!
I've experienced the same crackling and popping noises on the Raspberry Pi's analog output when using mpd. The problem is also discussed here: https://github.com/raspberrypi/linux/issues/128
Your idea of configuring the audio hardware to be initialized only once at boot time is exactly what I did to solve the problem. It's possible to do this using the PulseAudio sound system, which works as a proxy between the audio hardware and programs that want to output sound. For example, audio players like mpd can be configured to use PulseAudio as audio backend.
PulseAudio has a configuration option (module-suspend-on-idle) that configures audio hardware sleep. Disabling audio hardware sleep fixed all crackling and popping noises for me.
I've outlined the necessary steps in closer detail on my blog: http://dbader.org/blog/crackle-free-audio-on-the-raspberry-pi-with-mpd-and-pulseaudio
I have the same problem and resolution is to use either USB audio or HDMI audio output (however converting hdmi audio to analog audio is not easy, converter >40$). It is caused by broadcom firmware. They were saying on rpi forum that it is on the list, but no one knows when it will be really fixed ...
Update: I have tried Creative Play! USB audio, it is the same, however the "click" is not that loud. So it is not 100% solution, we have to wait for the fix.
By using the Aureon Dual USB sound card I got zero popping from my raspi. Before I had popping at every song.
I have read that using the Aureon is impossible without limiting the usb ports to version 1.1, but this was not the case for me. It worked out of the box. One slight problem remains, I cannot insert the sound card when the raspi is on, it will reboot. But that's not a problem for me, I never remove the sound card.
My raspi runs raspbian wheezy and plays music via mpd and an nfs share.

Resources