This is a really big ask but I have tried for about 4 months now trying to get this to work. So, I am creating a personal assistant using a raspberry pi 3 model B and python (I know they are not the best of choices). Most of it works apart from the main feature, the speech to text (STT). I would like it to convert all spoken words to text and when you finish a sentence I would like it to enter and finish so the text can be processed as a string. Do you have any suggestions on what I could use to do this or any links to help me.
Thanks in advance.
I have completed similar project to yours recently.
If internet connection is not a problem for you, I would suggest using Wit.ai. It has nice Python API, or you could use it through HTTP API.
Your assistant would have to record speech, then send data to remote API and receive response with text as an answer.
Take into account, that STT process is quite complex, so trying to solve it with local solutions might be a bit too much to cope with for Raspberry. What's more, you would have to (probably) prepare vocabularies, etc. Using remote STT service, you don't have to do that.
If you cannot, or do not want to use remote service, you can always try CMU Sphinx. But for that, you need somebody else to help you with it, as I have no experience using it whatsoever.
Related
I am working on a project that requires the program to take in text received via SMS. But, whenever I look on the internet, I find services like twilio, which works only through an external number. That is, one may send a text to the twilio number so that the python program may receive and process it.
For my purposes, I intend people texting me through my personal number, and python accessing the body of that text for processing. Is there any way to do this? (PS: i don't have a mac)
You might want to look into this. It’s not in python, but there having a solution in python isn’t that simple, hence not that popular
I'm working on a system that locks several parts in my computer and opens them ONLY using my voice saying specific
words (in python). I've already made the system that locks parts in my computer until you give it password but I want to change it to voice.
I did find some voice processing on the web but its really complicated and without explanation
in python.
I know python might not be the right language to do so, but I want to try!
thanks for any help!
You can start from pre-built services, like Azure Speaker Recognition. The process is quite straightforward, you provide audio training sample for each single speaker (yourself for example). This will create an enrollment profile based on the unique characteristics of your voice. If your are looking to build a solution from scratch, then Fast Fourier Transform would be a great start.
Python is a good point to start!
Search Python Speech recognition in google in you will have a lot of examples for doing that.
Enjoy!
I am trying to create a simulation of Alexa or Google Home (very basic). I am using the SpeechRecognition module with the Google as recognizer. I have managed to get it working but I don't know how to run the whole script when I say a word (I want it to be hearing always (as Alexa does)).
Ex:
'Hey, Robot'
AI = Hi, how may I help you? (runs whole script)
I had thought about looping through a piece of code every 5 seconds and then connecting to Google API but this isn't possible as the API is limited to 50 requests per day.
Any help is appreciated,
Thanks in advance
You can use "Silence" threshold to identify need of sending request to google, with that approach you will avoid sending to match requests. For code sample see Python record audio on detected sound.
Alternatively you can use open sourced speech recognition packages and end up with independent application, see The Ultimate Guide To Speech Recognition With Python article for that approach.
However, if you still prefer using of the remote API, you can combine approaches above, and use SpeechRecognition to understand the Hey, Robot phrase and after that, switch application to use Google API for speech recognition for some small short period of time, of course the threshold check shall be used to avoid querying Google API when client don't continue to speak after saying Hey, Robot.
Good Luck !
Go with CMU Sphinx. It does exactly what you want. See here:
https://cmusphinx.github.io/wiki/
So I want to make a program to monitor an irc chat and send the user an email if their name is mentioned.
I'm wondering if it is possible to output the irc chat messages to a txt file? I'd like to use Python if possible.
The irc chat is a WeeChat. I'm not going to lie, I haven't been programming very long so I'm pretty clueless. I also had the idea of capturing the memory with Cheat Engine but that seems like a pretty terrible solution and I'd prefer if it can run on Linux. I also had a look at mIRC scripting which could work maybe?
UPDATE:
I can log the output of the chat using PuTTY logging feature, however the output is really hard to read and parse:
22[33m:[39m12[33m:[39m07 [1m[32m#[36mUSERNAMECENSORED[0m [32m| [39m"Two software developers are required, for[7C[34m│[1m[39m[32m#[0mUSER[58D[32m| [39mstudent summer positions, to write RESTful web [34m│[1m[39m[32m#[0mUSER[32m| [39mservices in Python using the Django REST[9C[34m│[1m[39m[34m [0mUSER[6;20H[32m| [39mframework. The application being developed is a [34m│[1m[39m[34m [0mdanielrb[7;20H[32m| [39mfinancial accounting system. Therefore, a[8C[34m│[1m[39m[34m [0mDee[56D
[32m| [39mknowledge of accounting is a distinct advantage. [34m│[1m[39m[34m [0meoghanc[60D[32m| [39mApplicants will be required to attend an[9C[34m│[1m[39m[34m [0mUser[10;20H[32m| [39minterview which will include technical[11C[34m│[1m[39m[34m [0mME[59D[32m| [39massignments. As well as training and experience, [34m│[1m[39m[34m [0mmtlight[60D
[32m| [39mthe[46C[34m│[1m[39m[34m [0mshane
22[33m:[39m12[33m:[39m09 [1m[32m#[36mUser[0m [32m| [39mpositions offer €400 per week for the successful [34m│[1m[39m[34m [0msherkin[60D[32m| [39mcandidates."[37C[34m│[1m[39m[34m [0myensil22[33m:[39m17[33m:[39m03 [1m[32m#[36mUSER[0m [32m| [39mIt's only two months of work (approx) though :/ [34m│
[39m22[33m:[39m27[33m:[39m52 [1m[32m#
How would I parse this so I can tell when a user is mentioned and read the message as a string?
So i bought a cheap mifare NFC chip reader from ebay for 5$. I wanted to play around with chips, and ultimately copy some NFC chips i have here. I have a NFC chip that I use to open my locker with on school, but the card we have is really big and inconvient, so I want to copy it on a smaller NFC chip and put it on my keyring.
So i hooked it up with my raspberry pi, and first off, there is NOTHING on internet about connecting this card with your raspberry pi. Ohwell, a challange, fun.
I found some basic code from a spanish website(im dutch so itwas kinda hard to understand :P) but it can only read the UID of a NFC. So i tried to understand it, and eventually i did, and I added the code to calculateCRC and read some blocks.
However, I have no clue how the NFC data structure actually works, all i did was find some arduino code samples that were in C, translated them to python, and I think it works.
So i setted it up that it reads block 0 to 8 and prints themn all. On all the NFCs i have I can only read block 0, rest is giving an error. And block 0 consists of one byte, that's a 0x04.
If anyone has any clue what is happening, please tell me. And are there any links were NFC data structure is actually explained. I found a bunch of Android stuff, but i dont have a smartphone, and i want to do it with this MFRC522 card. I read somewhere you need to auth a block or something? I saw some code for that too, but how does that work? How do I know the keys?
thanks
There are lots of links on google wherein you can find information on data format used in NFC.
Some of them are
http://learn.adafruit.com/adafruit-pn532-rfid-nfc/ndef
http://developer.nokia.com/Community/Wiki/Understanding_NFC_Data_Exchange_Format_(NDEF)_messages
I built an application on the Raspberry Pi to read and write RFid cards. The easiest way to do it is to use the pcscd library and java. There are good examples on the Oracle website and the pcscd library is broadly supported.
Be aware though. The usb cardreader I used did not seem to work initially. The cardreader uses to much power for the USB ports of the raspberry. When I used a powered usb hub, things worked smoothly.
Fred