I'm currently working on a project where I need to create some functionality where the user can talk to the product (Raspberry Pi 3). And with talking I mean that the user should be able to say one or two words something like "product start" to the Pi and then it would get activated and do it's thing.
Now because of this, the Pi would need to be able to continuously listen and get activated when a certain combination of words is said by the user.
I've implemented the SpeechRecognition library, this sort of works but sadly there is a maximum of ~10 seconds where the Pi would listen.
I'm wondering if there are any library's which would help me with my use case, any help is welcome.
Can you explain better what do you mean by
sadly there is a maximum of ~10 seconds where the Pi would listen.
From my experience using CMUSphinx (Let me recomend the pocketsphinx version for your use-case), works continuously without problem.
Did you manage to know if the problem is on the Pi side, or the SpeechRecognition side?
What engine are you using behind SpeehRecognition. CMUSphinx, Google, Microsoft? With Google and Microsoft, it iis normal that they have a 10 seconds limitation. However, using CMUSphinx this should not happen. But, you might need to learn a bit how to set up an ASR system.
Related
I'm working on a long-range communication system, and I need help. I can't use GSM, WIFI, etc. I am testing a LoRa Raspberry Pi shield, and I bought this, and I have followed this tutorial. Of course I have tested other tutorials, like this, this lib, and others. None of them worked.
I have bought another 2 modules, because maybe my first purchase didn't work, but this wasn't the problem. (I didn't read any data from the other device in receiver module, but in the sender the TX LED was activated).
I want to communicate up to 30km (with a direct view), and I want to send data about 100 kbit per second.
So if you find another way to solve this problem (e.g. better tutorial), I will be grateful. I'm open to any other solution and idea. Thanks for your help.
(If this isn't the best forum for this, I'm sorry)
The problem is with the eByte module on the RPi shield. What module are you using on the other end? The same? Or something else? If it's the same, it should work. But if you are using a non-eByte, regular LoRa module, like an SX1276 or SX1262 attached to an ESP32, forget about it, it won't work. It turns out that the "managed" eByte modules, with a -T- in their name, don't do LoRa, really, but FSK/OOK. So if you are trying to communicate between a RPi shield and a regular LoRa module, you will grow old before it works.
As for 30 km, forget about it. Not with that equipment. And especially not at 100 kbs, lol.
so I am working with a friend in developing a robot (using a Raspberry Pi). This robot we are working on will be an autonomous boat. Now, for the Raspberry Pi, the Raspbian image we are using already has ROS (specifically, ROS Kinetic) nicely installed on it, and I have confirmed that ROS is working.
For our robot boat, we have different features that we wish to include in it:
Getting GPS location
Getting audio via hydrophone and processing audio to detect a certain frequency range (ie. I want the boat to detect when a sound of 8500-9000 Hz is clearly heard via the hydrophone)
Being able to communicate over XBee
So I have used ROS in the past and I am familiar with the concept of publishing and subscribing to topics. However, my friend says that ROS will cause performance issues due to ROS having some "overhead", claiming that ROS will slow down our audio processing or something.
Instead, he proposes the following alternative method:
Have each of the 3 aspects of our robot (as mentioned above) in different Python files.
When the Raspberry Pi starts up, have all of the Python files be run automatically.
To pass information to each other (essentially "mimicking" the publishing/subscribing functionality of ROS), the Python files will write to different text files (to "publish" values) and read from those text files (to "subscribe"), and the values that these text files contain will be overwritten on each update of a new value.
So... which method of passing information is the better method for our robot?
Using ROS
Using the aforementioned file writing/reading method proposed by my friend
Something else
Oh, and other things that I should mention:
I know how to use ROS, my friend doesn't
My friend has not actually finished writing all the code for doing his file writing/reading idea, whereas ROS is already all setup and good to go on the Raspberry Pi
While I could find plenty of sites that list the various advantages of ROS, I could not find anything that compares ROS to my friend's method that I have mentioned above.
ROS has nodelets which allow multiple nodes to live in the same process and communicate with each other without copy overhead - so less overhead than writing a file would incur.
http://wiki.ros.org/nodelet
I have a project in my job.
The target is to prepare 14 SD cards for provisioning any Raspberry Pi 3.
So I have to found a solution to do it automatically and follow which SD card is ready to start and which one is complete.
I have the idea to build with a Python3 program and a tkinter interface because I know a little bit Python and not others languages...
The program should work like this :
List every Windows drives where SD card is mounted
Push a button in front of the letter of the SD card drive to start the provisioning.
The provisioning is all steps to make the SD cards bootable with an OS. So I have to pass some DISKPART commands or equivalent in Python I think, if you have any suggestions ?
Show a statut in front of each drive to follow if the drive is pending, working, complete, etc.
I have a huge interogation about this. My program has to refresh every informations. I mean the program should work in real time or not ? What is the best way to proceed ?
To be clear, I don't want someone building to me this program, I just want to have some good idea to implement.
Thank you
You can use this module to execute commands. For example:
import subprocess
completed = subprocess.run(['ls', '-1'])
print('returncode:', completed.returncode)
I can't help with the Python part, but if you have a WinAPI window with message handling (so the WindowProc thing), WM_DEVICECHANGE is the message, here are the actual event categories and RegisterDeviceNotification is how you subscribe to it. Complete (but C) MSDN example is here
While implementing it may require some work, viability itself depends on getting access/not getting access to the message queue (from Python). Based on this and this it seems to be possible, but I have no experience with it.
I'm making a Skeeball program and boards that both work off of a raspberry pi and GPIO sensors with a tkinter gui. The first table and program is working great and now I was thinking about the possibility of adding a second table with multiplayer games.
Each pi would have to talk to each other, preferably over a LAN network instead of using I2C or serial pins. Basically I just need something mostly to pass variables from one pi to another.
My first thought was to use pickle to save to a shared network folder since I'm already using pickle to save my highscores. I just have no clue how to set up a shared folder over raspbian and I'm guessing that probably a pretty bad approach to solving the problem.
I'm also really new when it comes to python and raspbian so sorry if this problem is something super easy all I could find online was how to have a pi talk with a windows pc or an arduino.
Thanks for any help you can give me!
I'm currently doing a project in which I'm making an ADS-B flightradar on a led matrix, which is controlled by a Raspberry Pi. I've found a program called dump1090 which receives and decodes the data from my SDR receiver. I can find lots of example on how to use to forward that data to a webserver or whatever, but I can't seem to find anything on how you can programmatically listen to the data dump1090 produces. Does anyone know how you can programmatically receive dump1090's data in order to use the data in a program? (any language would do, but perhaps python would be the most obvious choice)
You should be able to start dump1090 using a programming language of choice (c/c++/java/python/etc.) and and read the std out pipe.
Personally, on Raspberry Pi, I find Python nicer to use since it's easier to test/reiterate without needing to compile. Python provides the subprocess package which allows you run dump1090(or any other application) from within Python and have a look at the output (using subprocess.check_output('dump1090') for example). Have a look at check_output and Popen options to see what works best with your application.