Comments (9)
@ThanhLNP if you set recognition.interimResults = false
, do you get a different behavior?
Is the behavior you're expect that you always see a final event where isFinal
is true, even if the interim results ended up being correct?
from speech-api.
@ThanhLNP can you elaborate a little bit? Are you running this code on some browser and never get an event where event.results[i].isFinal
is true? I suspect that's because of recognition.continuous = true
, but isn't this the behavior you expected?
from speech-api.
Thank you for the reply,
i'm running on chrome,
and I still want recognition.continuous = true,
but i don't get isFinal like on this demo page https://www.google.com/intl/en/chrome/demos/speech.html
from speech-api.
Is there a way I can get isFinal = true while recognition.continuous = true?
from speech-api.
Yes, that's what I mean
For example, when I say "one" I want to get "1" right after
keep saying "two" then I just get "2" right after
Thank you
from speech-api.
@ThanhLNP I was wondering about the case where the interim result is actually correct. Let's say I speak "hello world" and get a first "result" event for "hello" with isFinal
being false, but it turns out that "hello" is correct. Are you then expecting another "result" event with "hello" but with isFinal
being true? Or is the problem specifically about numbers, "one" vs. "1"?
It would be helpful if you could share a log of the result events you see, what the resultIndex
is, and what's in the results
list in each event.
from speech-api.
Yes, the problem is with numbers
but the real problem is I want to get word by word as soon as I say (with recognition.continuous = true), not just get it after stop
as with this demo page: https://www.google.com/intl/en/chrome/demos/speech.html, I see that words are bold after a while, not after stopping
from speech-api.
after I added some other handlers I finally got the final_transcript value, I have a demo clip you can check out.
I just want to say that I get the final_transcript value quite slowly, and it returns a lot of times (you can see in the clip)
Your project is wonderful, thank you, and hope it gets better and better
https://drive.google.com/file/d/1MYyN9Z8EXIZfEebdkZFRTIosx8jiso65/view?usp=sharing
continuous = true;
...
recognition.onresult = function(event) {
if (continuous) {
var interim_transcript = '';
for (var i = event.resultIndex; i < event.results.length; ++i) {
if (event.results[i].isFinal) {
final_transcript = event.results[i][0].transcript;
} else {
interim_transcript = event.results[i][0].transcript;
}
}
} else {
final_transcript = event.results[0][0].transcript;
}
console.log(final_transcript);
*** some other handles ***
};
from speech-api.
@ThanhLNP thanks for putting together the demo! At this point it seems fairly clear that this isn't necessarily an issue with the spec, which defines all of the events being fired here, but an implementation issue, where Chrome is not behaving the way you're expecting it. Would you be able to file an issue https://crbug.com/new with a test case attached?
from speech-api.
Related Issues (20)
- Define how to load custom voices HOT 3
- Can I capture UserMedia stream and do processing on that along with using SpeechRecognition HOT 1
- SpeechRecognition ends after unspecified time
- Bubbling model for SpeechSynthesisUtterance HOT 1
- need to improve speech recognition in conversation between multiple speakers
- Speach Destination HOT 1
- Requirements for SpeechSynthesisErrorEvent HOT 1
- Offline/on-device speech recognition HOT 2
- Could we have web speech API support IPA for speech synthesis voice language HOT 2
- Arabic TTS Web Speech is Missing some letters
- Interaction with screen readers and other assistive technology? HOT 1
- getVoices() is supposed to be user agent dependent, but appears not to be. HOT 1
- Android issue HOT 1
- Feature request: SpeechRecognition pause/resume HOT 2
- Multiple Issues HOT 1
- speechSynthesis: utterance with lang but not voice
- Why is SpeechRecognition not working correctly in Safari?
- Clear Privacy Contracts HOT 1
- Continuously listening
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speech-api.