SpeechKITT.displayRecognizedSentence (true) not working, Any alternative?
alexia-rose opened this issue · comments
@TalAter Sir I really big fan of you because of your all open-source cool projects......
I am Using your Annyang js on my project which working very well but I don't know why
SpeechKITT.displayRecognizedSentence (true)
not working, But I badly need to show what the user speaks on the mic, is there any fix for this, if not then is there any alternative way that I can perform to do this?
here is the code
`if (annyang) {
// Add our commands to annyang
annyang.addCommands({
'hello': function() { alert('Hello world!'); }
});
// Tell KITT to use annyang
SpeechKITT.annyang();
// Define a stylesheet for KITT to use
SpeechKITT.setStylesheet('//cdnjs.cloudflare.com/ajax/libs/SpeechKITT/0.3.0/themes/flat.css');
// Render KITT's interface
SpeechKITT.vroom();
SpeechKITT.displayRecognizedSentence(true);
}`
Hi @alexia-rose
Thanks for bringing this to my attention. I just tested this and I can see the issue you are describing.
It looks like KITT is correctly adding the recognized sentence text and appending it to the DOM...
CleanShot.2021-11-07.at.15.06.48.mp4
... unfortunately it looks like the element containing that text has display: none;
set on it.
I will try to find some time to fix this, but it won't likely be in the next few months.
If you would like to tackle this and send a PR with a fix, that would be awesome. Alternatively, you might be able to get around this bug for now with a custom stylesheet that replaces themes/flat.css
. Specifically the section shown here b2306c4
@TalAter thank you so much for your response and time sir,
I am pretty new to web development so having problems understanding how I can fix it by myself :(
I will wait for you to fix this 😢 until I will use it without this feature
or does Annyang provide any method that returns recognized words?