News for hackers. Stuff that matters.
Re:DeepSpeech 0.6 by reubenmorais on Thursday December 05, 2019 @06:01AM (#21711422)
Author here. I would add to what the sibling comments have mentioned by saying that SotA results should be taken with a grain of salt. Our engine is capable of streaming (processing the audio as it's being recorded), which is not doable with architectures that have bidirectional decoders or attention mechanisms that require the whole encoder input ahead of time.

For real world applications, this is absolutely crucial, users want latency numbers on the order of milliseconds, not seconds. This is why, if you run a standard test set like LibriSpeech on, say, a commercial offering from Google, it will perform considerably worse than state of the art according to Google papers.

This repository [0] has a benchmark of some commercial offerings. Our model beats all of those on Librispeech clean and other (except for Speechmatics on Librispeech clean), as well as on Common Voice. But note that the Common Voice corpus used in that benchmark is very old.

In sum, I would compare this against solutions that go for the same space: fast, client-side ASR, rather than state of the art.

[0] https://github.com/Franck-Dernoncourt/ASR_benchmark#benchmar...

Re:DeepSpeech 0.6 by albertzeyer on Thursday December 05, 2019 @08:06AM (#21711950)
Hi! I'm from the RWTH team (https://paperswithcode.com/sota/speech-recognition-on-libris...). Our best system (2.3% WER) (trained only on the Librispeech data, i.e. much less data than your model) currently is a hybrid HMM/NN model, and you are right, the acoustic model uses a BLSTM. However, we have shown in other work (https://www-i6.informatik.rwth-aachen.de/publications/downlo...) that you can expect similar performance in an online system, or not much worse (there is also many related work, which often is maybe 5-10% relative worse than the offline system).

I guess you prefer an "end-to-end" model over a hybrid HMM/NN model, for simplicity, right? As far as I remember, you use CTC, right? I always wondered why you have chosen CTC, and not some better model, like RNN-T, RNA, or some of the streaming attention variants. They should give you all the same properties (online capable, low latency, simple, end-to-end), but much better WER performance. Or is this simply because there currently is no simple ready-to-use implementation for those? Note that we published some TF code recently for some streaming attention variants, and plan to publish some RNN-T/RNA code soon.

Re:DeepSpeech 0.6 by reubenmorais on Thursday December 05, 2019 @08:41AM (#21712159)
Hi!

> I guess you prefer an "end-to-end" model over a hybrid HMM/NN model, for simplicity, right?

Simplicity and ease of targeting other languages, yes. We're a small team.

> As far as I remember, you use CTC, right? I always wondered why you have chosen CTC, and not some better model, like RNN-T, RNA, or some of the streaming attention variants.

We started DeepSpeech in 2016, before these recent developments for end-to-end ASR were mainstream/SotA.

> Or is this simply because there currently is no simple ready-to-use implementation for those?

Implementing the model architecture for training is only part of the problem for us. We have a hand-crafted inference graph to allow for small and efficient client code and inference models, and the more complex the architecture is, the trickier it gets to make sure it all works on all platforms, including TFLite, with quantization, etc.

We're investigating alternative architectures as well as mixed CTC/RNN LMs to deal with language model size, but no final decisions made yet.

> Note that we published some TF code recently for some streaming attention variants, and plan to publish some RNN-T/RNA code soon.

Nice! Can you share a link to the streaming attention code?

Re:DeepSpeech 0.6 by mostlyjason on Thursday December 05, 2019 @09:28AM (#21712478)
I really hope you adopt the latest models particularly streaming attention variants. I think you should validate with users the assumption that latency is more important than WER.

IMHO the WER is more important than latency improvements in the millisecond range. The most frustrating thing is having to dictate over and over and the transcription is incorrect each time.

Consider that the time to a correct transcription is the latency plus error correction. If error correction is manual it will be orders of magnitude slower, so optimize for WER.

I’m terms of competition, Siri has latency in the 5+ second range due to the network call especially in area with poor data rates. I think a client side model like yours will easily win in this category. If you’re already ahead here, why not focus on WER next?

Another great capability is to generate alternative transcriptions for words with low confidence values to allow for quick error correction. Do you offer something like this today?

Also, consider the long term view that new models are constantly being released and refined. It’d be best to have an architecture that allows quick replacement without a lot of hand tuning, or where the tuning can be automated to a greater extent.

Re:DeepSpeech 0.6 by whyleyc on Thursday December 05, 2019 @06:53PM (#21717976)
Thanks for all the hard work you have put in so far @reubenmorais

+1000 to @mostlyjason's comment - Great latency figures mean nothing if the word error rate is high, since it dents confidence in the output (so why use DeepSpeech?) and (as the parent comment notes) necessitates manual error correction.

I would love to see a future release focus on optimizing WER for these reasons.

Re:DeepSpeech 0.6 by albertzeyer on Thursday December 05, 2019 @09:32AM (#21712511)
> Nice! Can you share a link to the streaming attention code?

It uses our TensorFlow framework Returnn (https://github.com/rwth-i6/returnn). We currently only have some configs/code online for hard attention variants, or segmental models. They can be found here: https://github.com/rwth-i6/returnn-experiments/tree/master/2...

Note that the configs are maybe not so cleaned up, as this is very much research. This is for a paper we submitted to ICASSP. We did not publish the paper yet elsewhere, but I can send you a copy by mail (just contact me: [email protected]).

Also, as this is research focused, the encoder here is also a BLSTM, because we wanted to compare this work to other global soft attention models, and have the comparison mostly focused on the streaming attention modeling aspect. And also there is some lookahead, which is currently unlimited. So it would need a few modifications to really be used for online streaming. I'm also not sure whether this is the best model, or whether some of the many other variants (MoChA, RNN-T, etc) are maybe better.

Edit: I forgot, we also have some local windowed attention variants, which can also be applied for streaming: https://github.com/rwth-i6/returnn-experiments/tree/master/2...

Re:DeepSpeech 0.6 by Nimitz14 on Thursday December 05, 2019 @10:43AM (#21713234)
You 100% tuned your hyper parameters and LM for librespeech, and only using librispeech data probably helped the result. When you start training systems for LVCSR it's normal for the WER to go up on some test sets. (This is why you can never expect a commercial system to get SOTA on librispeech, despite it being much better system in reality)
Re:DeepSpeech 0.6 by gok on Thursday December 05, 2019 @10:52AM (#21713301)
But these results are about in line with other CTC systems. The original Baidu paper [1] had 7.89% with original Deep Speech and 5.33% with "Deep Speech 2" where they threw more complicated networks at it and added another 11K hours of external speech traingin data.

[1] https://arxiv.org/pdf/1512.02595v1.pdf

Re:DeepSpeech 0.6 by option on Thursday December 05, 2019 @10:23AM (#21713043)
NVIDIA has QuartzNet which contains only 19M weights and achieves 3.9% on test clean without language model and less then 3 with LM. Code (Pytorch): https://github.com/NVIDIA/NeMo Paper: https://arxiv.org/pdf/1910.10261.pdf
Re:DeepSpeech 0.6 by lunixbochs on Thursday December 05, 2019 @11:10AM (#21713466)
> For real world applications, this is absolutely crucial, users want latency numbers on the order of milliseconds, not seconds.

My wav2letter research does not use streaming, despite supporting streaming, because I get lower average latency (roughly 0.02x RTF including decoding, or 80ms for a 4000ms input audio like you describe in the article) by running the entire encoder CNN at once instead of running it in chunks.

This is also nice because the CPU usage is practically nothing (0.1%) until you stop talking.

I have a web demo here [1], with a relatively terrible language model (mostly just been working on acoustic modeling so far, as it’s just me). Most of the latency is waiting for the JavaScript VAD (which is much slower than webrtcvad and I couldn’t figure out how to tune it) and waiting for the network. If you look at the network inspector, the server should report its encode and decode times.

[1] https://web2letter-west-1.talonvoice.com/

Re:DeepSpeech 0.6 by IshKebab on Thursday December 05, 2019 @11:08AM (#21713449)
> For real world applications, this is absolutely crucial, users want latency numbers on the order of milliseconds, not seconds.

You should follow Google's approach - give fast live results that don't depend on data from the future, but also go back and correct old words when you do have that data. It's kind of how humans work really.

Re:DeepSpeech 0.6 by IshKebab on Thursday December 05, 2019 @11:04AM (#21713411)
> Our engine is capable of streaming

A bit misleading given that decoding can't be streamed yet.

Re:DeepSpeech 0.6 by lunixbochs on Thursday December 05, 2019 @11:12AM (#21713486)
I’m not sure what you mean. The image in the blog post clearly shows small chunks of decode time happening during the speech (every second).
Re:DeepSpeech 0.6 by IshKebab on Thursday December 05, 2019 @11:22AM (#21713562)
The API documentation says decoding starts from the beginning every time. Could just be the Python API hasn't been updated I guess?

Edit: never mind - the API documentation was just out of date.