Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run in electron environment. #9

Open
chroma9 opened this issue Sep 24, 2020 · 2 comments
Open

Failed to run in electron environment. #9

chroma9 opened this issue Sep 24, 2020 · 2 comments

Comments

@chroma9
Copy link

chroma9 commented Sep 24, 2020

When running in a test environment for Electron, spoken runs into an error quickly. Here is the code used.

spoken.listen.on.start( voice => { console.log('Started Listening') } );
spoken.listen.on.end(   voice => { console.log('Ended Listening')   } );
spoken.listen.on.error( voice => { console.log('Error Listening', voice)   } );
spoken.listen.on.partial( ts => console.log(ts) );
spoken.listen()
    .then(     ts => console.log("Partial: " + ts) )
    .catch( error => console.warn(error.message)   )

I then received the following error.

bubbles: false
cancelBubble: false
cancelable: false
composed: false
currentTarget: SpeechRecognition {grammars: SpeechGrammarList, lang: "en-US", continuous: false, interimResults: true, maxAlternatives: 1, …}
defaultPrevented: false
error: "network"
eventPhase: 0
isTrusted: true
message: ""
path: []
returnValue: true
srcElement: SpeechRecognition {grammars: SpeechGrammarList, lang: "en-US", continuous: false, interimResults: true, maxAlternatives: 1, …}
target: SpeechRecognition {grammars: SpeechGrammarList, lang: "en-US", continuous: false, interimResults: true, maxAlternatives: 1, …}
timeStamp: 472.00499998871237
type: "error"

I hope you can get back to me.

@stephenlb
Copy link
Owner

error: "network" looks like may be a permissions issue. In electron config/system this may be needed: https://www.electronjs.org/docs/api/system-preferences#systempreferencesgetmediaaccessstatusmediatype-windows-macos

@stephenlb
Copy link
Owner

stephenlb commented Sep 26, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants