News for hackers. Stuff that matters.
Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @02:48AM (#11820799)
"Amazon Alexa skills JS API...There isn’t really any alternative right now..."

I want to take this opportunity to plug an Alexa Skills Kit API (in Python) I just dropped:

https://github.com/johnwheeler/flask-ask

It does a lot of things the JS API doesn't: Jinja templates, decorator-based intent routing, slot defaults/conversions, and request signature verification to name a few.

Re:Open Source Speech Recognition by jamornh on Thursday June 02, 2016 @05:08AM (#11821202)
I was just looking for something like this, and as of yesterday I only found this project: https://github.com/anjishnu/ask-alexa-pykit

Yours look much simpler to get started, would you care to comment on what the differences are between yours and the project I just posted?

Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @05:50AM (#11821333)
Yes!

I just put mine up a month ago - not discoverable for "Python Alexa" or any keywords. Working on it :-)

So for the differences -

Alexa Skills are deployable as AWS Lambda functions or behind HTTPS. Currently, ask-alexa-pykit works on Lambda and Flask-Ask implements the signature verification required for HTTPS deployments. (i.e. Flask-Ask works on your own HTTPS server or Lambda).

Another difference is in the intent mapping design. Flask-Ask is based on the same architectural patterns of Flask with context locals, parameter mapping / conversion, and of course, Jinja templates!

For example, Mapping an intent with ask-alexa-pykit looks like this:

http://pastebin.com/raw/hQJLKnHL

Flask-Ask is like this:

http://pastebin.com/raw/9fWrGNYY

Flask-Ask also converts slots like firstname from the example above into arbitrary datatypes, and has stock conversions for AMAZON.DURATION (e.g. 'P2YT3H10M' into a Python datetime.timedelta). Full parameter mapping docs here: https://johnwheeler.org/flask-ask/requests.html#mapping-inte...

Flask-Ask templates are grouped together in the same files since utterances are typically small phrases--to make them easier to manage. Templates are of course an optional feature but are encouraged!

It's still very early, but I'm working my butt off, full-time on it! I have a 5-min tutorial that shows how to get up and running with Flask-Ask and ngrok: https://www.youtube.com/watch?v=eC2zi4WIFX0 - The API has changed a little, if you try it out and have any questions, you can do an issue or hit me up! john at ! johnwheeler.org

Thank you!

Re:Open Source Speech Recognition by jamornh on Thursday June 02, 2016 @09:59AM (#11822467)
Thanks for the detailed reply! I've been interested in the echo and wanted to get into it for a while so I'll definitely dig into flask-ask and try to get up and running with it.
Re:Open Source Speech Recognition by edraferi on Thursday June 02, 2016 @08:18AM (#11821871)
That video was great! Just started thinking about Alexa, this looks like an easy way to get moving with it.
Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @12:55PM (#11824075)
Thank you!
Re:Open Source Speech Recognition by dozzie on Thursday June 02, 2016 @04:18AM (#11821070)
OK, you have written an API. When can be expected that you publish a code for a service that implements this API?
Re:Open Source Speech Recognition by johnwheeler on Thursday June 02, 2016 @04:32AM (#11821106)
Hi dozzie!

Please check out the samples directory for client code:

https://github.com/johnwheeler/flask-ask/tree/master/samples

These are direct ports from the Java samples:

https://github.com/amzn/alexa-skills-kit-java/tree/master/sa...

Re:Open Source Speech Recognition by kleiba on Thursday June 02, 2016 @02:46AM (#11820790)
Please do not confuse the terms "voice recognition" and "speech recognition": the former refers to identifying people by their voice, the latter to transcribing spoken words to text.
Re:Open Source Speech Recognition by zeckalpha on Thursday June 02, 2016 @07:55AM (#11821768)
Speaker recognition unambiguously describes identifying people by their voice, whereas voice recognition frequently is used for both. This blog post isn't confusing the terms – they've already been confused.
Re:Open Source Speech Recognition by nxzero on Thursday June 02, 2016 @06:22AM (#11821434)
Not an expert, but might go even further to state that voice recognition doesn't even require identification of a speaker, but that words are being spoken.
Re:Open Source Speech Recognition by richarme on Thursday June 02, 2016 @06:38AM (#11821493)
That would be speech detection / voice activity detection.
Re:Open Source Speech Recognition by afsina on Thursday June 02, 2016 @02:45AM (#11820787)
Any reason why not to use Kaldi (https://github.com/kaldi-asr/kaldi)? AFAIK it uses most of the state of the art algorithms.
Re:Open Source Speech Recognition by jandrese on Thursday June 02, 2016 @02:54PM (#11825096)
Frankly, Kaldi is nearly impossible for mere mortals to use. It's 100% targeted at people doing PhD work in speech recognition who have a colleague who already knows how it works and can set it up for them.

IMHO, there is a big opportunity for someone to come along and repackage it in a user friendly way, but the people who actually understand it are too busy doing "real work" to bother with such frivolity.

Re:Open Source Speech Recognition by squeaky-clean on Thursday June 02, 2016 @10:59AM (#11822967)
Like others are saying, it's just much harder to use. The official tutorial even says "The intended audience for this tutorial is either speech recognition researchers, or graduates or advanced undergraduates who are studying this area anyway." in the first paragraph. It seems like Kaldi is meant for people who actually know how speech recognition works, while other tools are meant for people who just want some text from some audio without really understanding how.

For example, I've been playing with home automation and speech recognition, and have been able to get any Sphinx based recognizer working in a single sitting, in a few hours or less. But I've yet to get Kaldi working yet after a several nights of effort. It seems much more powerful, and based on my reading, it's more accurate than Sphinx. But that doesn't do me any good if I can't get it to run, haha.

Re:Open Source Speech Recognition by kleiba on Thursday June 02, 2016 @02:47AM (#11820794)
I was thinking the same. Kaldi's documentation is a bit lacking, and it's non-trivial to use besides their provided "recipes".
Re:Open Source Speech Recognition by roel_v on Thursday June 02, 2016 @02:57AM (#11820824)
It's (a lot) more difficult to set up.
Re:Open Source Speech Recognition by bruth on Thursday June 02, 2016 @05:39AM (#11821299)
A bit of a tangent, but are there good speech-to-text tools that can take an audio file (i.e. a voice memo) and transcribe it?
Re:Open Source Speech Recognition by nfriedly on Thursday June 02, 2016 @01:37PM (#11824443)
I've done a lot of work with the Watson Speech to Text service (I work on the Watson team), and I've been pretty impressed with the results. You can upload an audio file (wav, flac, or ogg/opus) to the demo to try it out: https://speech-to-text-demo.mybluemix.net/
Re:Open Source Speech Recognition by bruth on Thursday June 02, 2016 @06:51PM (#11826777)
That is a super cool service! I love the stream of alternate words with confidence scores.
Re:Open Source Speech Recognition by athenot on Thursday June 02, 2016 @06:21AM (#11821429)
Nuance has a suite that does that. We use their software and it's pretty good—despite being a headache to configure. But it's neither free nor open source.
Re:Open Source Speech Recognition by nmcfarl on Thursday June 02, 2016 @01:02PM (#11824135)
This is also what Castingwords does - if you want high quality results transcribed by people. https://castingwords.com/support/transcription-api.html

We use Speechmatics (and sphinx) for caption alignment and timestamps. We certainly recommend them if that’s the service you need.

Re:Open Source Speech Recognition by willwill100 on Thursday June 02, 2016 @06:48AM (#11821530)
that's exactly what we do at speechmatics.com - feel free to give us a try and make the most of the free credits
Re:Open Source Speech Recognition by bruth on Thursday June 02, 2016 @08:09AM (#11821826)
Great, I just submitted the first audio file for transcription. Looking forward to seeing the output.
Re:Open Source Speech Recognition by afsina on Thursday June 02, 2016 @08:33AM (#11821934)
Google will start giving this service. https://cloud.google.com/speech/
Re:Open Source Speech Recognition by teekert on Thursday June 02, 2016 @04:14AM (#11821056)
Maybe relevant: a FOSS AI project:

https://mycroft.ai/

Re:Open Source Speech Recognition by bitL on Thursday June 02, 2016 @03:52AM (#11820988)
Anyone knows which one should I use for an offline real-time speech recognition on a humanoid robot running Raspberry Pi 2?
Re:Open Source Speech Recognition by smcameron on Thursday June 02, 2016 @10:33AM (#11822722)
Pocketsphinx. Here is a demo https://www.youtube.com/watch?v=tfcme7maygw and a blog post about how to do it: https://scaryreasoner.wordpress.com/2016/05/14/speech-recogn... Code is in here (gpl2) https://github.com/smcameron/space-nerds-in-space In particular, look at snis_nl.h, snis_nl.c

The trick with pocketsphinx is to limit the vocabulary you want to recognize, and create a corpus of the types of things you want to be able to recognize and feed it through here: http://www.speech.cs.cmu.edu/tools/lmtool-new.html

If you try to use pocketsphinx to recognize arbitrary English (e.g. dictation) it's not going to work very well in my experience.

Re:Open Source Speech Recognition by roel_v on Thursday June 02, 2016 @07:12AM (#11821608)
Two realistic options, one is pocketsphinx, the other Kaldi. When running on a Pi, pocketsphinx will be your only realistic option for realtime detection. You'll want to move to a RaspPi 3 as well, and you'll want to use a customized dictionary to try and get your recognition speed up. Lastly, there are several parameters you can tweak that'll affect recognition speed.

Raw processing power will be the bottleneck on a Raspberry Pi.

Re:Open Source Speech Recognition by doc_holliday on Thursday June 02, 2016 @11:17AM (#11823133)
Slightly related, does anyone know of any speech recognition library that also analysises the intonation / emotion in speech?

For example that has the ability to recognise anger / happy / questioning to relative accuracy?

Re:Open Source Speech Recognition by knodi123 on Thursday June 02, 2016 @11:41AM (#11823374)
NO! BUT THAT'S A GOOD QUESTION!

But seriously, I've seen emotion recognition, and speech recognition, but haven't come across anything that provides both in one package.

Re:Open Source Speech Recognition by doc_holliday on Thursday June 02, 2016 @11:52AM (#11823497)
Do you have link to good emotion recognition if you have used one?

Perhaps, could use wrapper library to combine functionality. It's a very interesting area.

Re:Open Source Speech Recognition by nfriedly on Thursday June 02, 2016 @01:32PM (#11824414)
I work on the Watson team, so I'm probably biased, but I think our AlchemyLanguage Emotion Analysis is pretty good: http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercl...
Re:Open Source Speech Recognition by knodi123 on Thursday June 02, 2016 @03:09PM (#11825211)
I have used none, but at the time I researched it, a lot of people were talking positively about

https://www.informatik.uni-augsburg.de/lehrstuehle/hcm/proje...

Re:Open Source Speech Recognition by avodonosov on Thursday June 02, 2016 @05:32AM (#11821274)
I tried sphinx in 2005 - we needed to recognize separate words, not even phrases. It wasn't viable, only commercial alternatives were satisfying.
Re:Open Source Speech Recognition by falcolas on Thursday June 02, 2016 @09:28AM (#11822276)
It has been 11 years since your last attempt then - have you checked it for improvements since?
Re:Open Source Speech Recognition by CaptSpify on Thursday June 02, 2016 @10:39AM (#11822774)
I have. It's... not great. It gets the job done, but it's a bit cumbersome.

It does recognize separate words, but, IMO, the biggest flaw is that it only recognizes pre-defined commands.

Re:Open Source Speech Recognition by gravypod on Friday June 03, 2016 @12:29AM (#11828305)
My main issue with doing anything voice related was the last time I looked into using Pocketsphinx I needed to define terms/dictionaries to parse from.

I'd love to mix and match NPL libraries, voice synthesis, voice identification, and speech recognition to make a comfortable "User Interface" to some systems in my house.

I think it'd be a fun project, but nothing seems to be able to take arbitrary audio streams and give me a "User identification" based on voice patterns and also arbitrary spoken text.

I know, yes, this is a VERY tall order, but it something that should be possible. At the very least, the identification part isn't needed. It's just important that it works offline and provides a text stream.

Re:Open Source Speech Recognition by jessyuan on Thursday June 02, 2016 @05:06AM (#11821199)
How can I study speech recognition???
Re:Open Source Speech Recognition by nshm on Thursday June 02, 2016 @03:01PM (#11825153)
Read the book: Automatic Speech Recognition A Deep Learning Approach http://rd.springer.com/book/10.1007%2F978-1-4471-5779-3. Also read another book http://www.amazon.com/Spoken-Language-Processing-Algorithm-D.... In parallel play with open source toolkits - cmusphinx, kaldi. Just run examples from tutorials to understand how things look in practice.
Re:Open Source Speech Recognition by pc2g4d on Thursday June 02, 2016 @06:48PM (#11826761)
Take a natural language processing course if possible
Re:Open Source Speech Recognition by 10dpd on Thursday June 02, 2016 @05:39AM (#11821300)
http://www.politepix.com/openears/ for iOS has been around since 2010
Re:Open Source Speech Recognition by tianlins on Thursday June 02, 2016 @03:02AM (#11820837)
How accurate is CMU Sphinx for speech recognition compared to what's inside Alexa?
Re:Open Source Speech Recognition by IshKebab on Thursday June 02, 2016 @03:09AM (#11820856)
Sphinx is pretty awful (remember the time before good speech recognition existed?). Alexa is far better.

Kaldi is much better, but very difficult to set up.

None of the open source speech recognition systems (or commercial for that matter) come close to Google.

Re:Open Source Speech Recognition by dharma1 on Thursday June 02, 2016 @03:12AM (#11820866)
Re:Open Source Speech Recognition by IshKebab on Thursday June 02, 2016 @08:02AM (#11821803)
Ah interesting link, I hadn't seen that.
Re:Open Source Speech Recognition by amelius on Thursday June 02, 2016 @07:03AM (#11821579)
> None of the open source speech recognition systems (or commercial for that matter) come close to Google.

Is that because of the data they have, or because of their superior algorithms?

Re:Open Source Speech Recognition by kuschku on Thursday June 02, 2016 @08:57AM (#11822042)
It’s because they used data from the public to train their models.

If, suddenly, someone would apply the fact that copyright bans remixes to training of neural networks, and apply the fact that licenses for this have to be granted explicitly, Google would lose 90% of their advantage over other companies.

Personally, I’d be for making a requirement that companies open source their trained models if the training data contained data supplied by users, not paid employees.

Re:Open Source Speech Recognition by davexunit on Thursday June 02, 2016 @09:20AM (#11822201)
I think the world needs the equivalent of OpenStreetMap but for speech data, so that the data is under a copyleft license that legally enforces reciprocation when the corpus is used or modified.
Re:Open Source Speech Recognition by ashitlerferad on Thursday June 02, 2016 @09:48AM (#11822392)
The closest is VoxForge:

http://voxforge.org/

Re:Open Source Speech Recognition by davexunit on Thursday June 02, 2016 @01:13PM (#11824221)
Didn't know about VoxForge. Thanks!
Re:Open Source Speech Recognition by amelius on Thursday June 02, 2016 @09:14AM (#11822163)
I sympathize, but good luck with that :)
Re:Open Source Speech Recognition by IshKebab on Thursday June 02, 2016 @08:00AM (#11821790)
Both I think, but mostly the data. Baidu's deep speech is meant to be very good and its design is public (they even open sourced one component of it).
Re:Open Source Speech Recognition by EGreg on Thursday June 02, 2016 @11:21AM (#11823162)
What about OpenEars? Is this better somehow?

http://www.politepix.com/openears/

Re:Open Source Speech Recognition by praccu on Thursday June 02, 2016 @08:28AM (#11821913)
cobaltspeech.Com -- in case you can't get what you want from a default Kaldi install.
Re:Open Source Speech Recognition by PSeitz on Thursday June 02, 2016 @05:49AM (#11821330)
pocketsphinx is too bad to be useful. I even tried to train special speech models with no luck.

I guess we need something new and shiny here in the open source space, probably based on neural networks

Re:Open Source Speech Recognition by roel_v on Thursday June 02, 2016 @07:12AM (#11821612)
Kaldi does this, but it's a lot harder than pocketsphinx to get running.
Re:Open Source Speech Recognition by skykooler on Thursday June 02, 2016 @10:53AM (#11822910)
Julius works well, but has no continuous dictation models for English yet (it was originally developed in Japanese).
Re:Open Source Speech Recognition by stephengillie on Thursday June 02, 2016 @10:40AM (#11822793)
[Deleted]
Re:Open Source Speech Recognition by skykooler on Thursday June 02, 2016 @10:50AM (#11822885)
.NET speech recognition is Windows-only. I doubt Mozilla would go for this as they are aiming for cross-platform software.