Skip to content

A webcomponent built with stencil to convert audio into text

License

Notifications You must be signed in to change notification settings

Fdom92/stencil-voice2text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Built With Stencil

stencil-voice2text

wc-voice2text is a web component built with Stencil that allows you to use the Web Speech API.

Getting Started

To try this component:

git clone git@github.com:Fdom92/stencil-voice2text.git
cd my-app
git remote rm origin

and run:

npm install
npm start

Using this component

Script tag

  • Put <script src='https://unpkg.com/stencil-voice2text@latest/dist/voice2text.js'></script> in the head of your index.html
  • Then you can use the element like this:
<wc-voice2text>
    <input type="text"></input>
</wc-voice2text>

Node Modules

  • Run npm install stencil-voice2text --save
  • Put a script tag similar to this <script src='node_modules/stencil-voice2text/dist/voice2text.js></script> in the head of your index.html
  • Then you can use the element like this:
<wc-voice2text>
    <input type="text"></input>
</wc-voice2text>

In a stencil-starter app

  • Run npm install stencil-voice2text --save
  • Add { name: 'stencil-voice2text' } to your collections
  • Then you can use the element like this:
<wc-voice2text>
    <input type="text"></input>
</wc-voice2text>

You can use it with ion input too, just import the ionic core collection:

<wc-voice2text>
   <ion-input></ion-input>
</wc-voice2text>

Parameters

Attribute Default Description
enabled true Make the speech recognition available or not
continuous false Make the speech recognition ends when the user stops talking or continue.
lang en-US Make the speech recognition use english.

About

A webcomponent built with stencil to convert audio into text

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published