All Projects → sdkcarlos → Artyom.js

sdkcarlos / Artyom.js

Licence: mit
A voice control - voice commands - speech recognition and speech synthesis javascript library. Create your own siri,google now or cortana with Google Chrome within your website.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Artyom.js

Java Speech Api
The J.A.R.V.I.S. Speech API is designed to be simple and efficient, using the speech engines created by Google to provide functionality for parts of the API. Essentially, it is an API written in Java, including a recognizer, synthesizer, and a microphone capture utility. The project uses Google services for the synthesizer and recognizer. While this requires an Internet connection, it provides a complete, modern, and fully functional speech API in Java.
Stars: ✭ 490 (-51.53%)
Mutual labels:  speech-recognition, speech-to-text, speech-synthesis, recognition
react-native-spokestack
Spokestack: give your React Native app a voice interface!
Stars: ✭ 53 (-94.76%)
Mutual labels:  voice-commands, speech-synthesis, speech-recognition, speech-to-text
Nemo
NeMo: a toolkit for conversational AI
Stars: ✭ 3,685 (+264.49%)
Mutual labels:  speech-recognition, speech-synthesis, speech-to-text
KeenASR-Android-PoC
A proof-of-concept app using KeenASR SDK on Android. WE ARE HIRING: https://keenresearch.com/careers.html
Stars: ✭ 21 (-97.92%)
Mutual labels:  voice-commands, speech-recognition, speech-to-text
web-speech-cognitive-services
Polyfill Web Speech API with Cognitive Services Bing Speech for both speech-to-text and text-to-speech service.
Stars: ✭ 35 (-96.54%)
Mutual labels:  speech-synthesis, speech-recognition, speech-to-text
Rhino
On-device speech-to-intent engine powered by deep learning
Stars: ✭ 406 (-59.84%)
Mutual labels:  voice-commands, speech-recognition, speech-to-text
Lingvo
Lingvo
Stars: ✭ 2,361 (+133.53%)
Mutual labels:  speech-recognition, speech-to-text, speech-synthesis
web-voice-processor
A library for real-time voice processing in web browsers
Stars: ✭ 69 (-93.18%)
Mutual labels:  voice-commands, speech-recognition, speech-to-text
AmazonSpeechTranslator
End-to-end Solution for Speech Recognition, Text Translation, and Text-to-Speech for iOS using Amazon Translate and Amazon Polly as AWS Machine Learning managed services.
Stars: ✭ 50 (-95.05%)
Mutual labels:  speech-synthesis, speech-recognition, speech-to-text
open-speech-corpora
💎 A list of accessible speech corpora for ASR, TTS, and other Speech Technologies
Stars: ✭ 841 (-16.82%)
Mutual labels:  speech-synthesis, speech-recognition, speech-to-text
spokestack-ios
Spokestack: give your iOS app a voice interface!
Stars: ✭ 27 (-97.33%)
Mutual labels:  speech-synthesis, speech-recognition, speech-to-text
Naomi
The Naomi Project is an open source, technology agnostic platform for developing always-on, voice-controlled applications!
Stars: ✭ 171 (-83.09%)
Mutual labels:  speech-recognition, speech-to-text, speech-synthesis
Awesome Ai Services
An overview of the AI-as-a-service landscape
Stars: ✭ 133 (-86.84%)
Mutual labels:  speech-recognition, speech-to-text, speech-synthesis
Kalliope
Kalliope is a framework that will help you to create your own personal assistant.
Stars: ✭ 1,509 (+49.26%)
Mutual labels:  speech-recognition, speech-to-text, speech-synthesis
musicologist
Music advice from a conversational interface powered by Algolia
Stars: ✭ 19 (-98.12%)
Mutual labels:  voice-commands, speech-recognition, speech-to-text
Spokestack Python
Spokestack is a library that allows a user to easily incorporate a voice interface into any Python application.
Stars: ✭ 103 (-89.81%)
Mutual labels:  speech-recognition, speech-to-text, speech-synthesis
Openseq2seq
Toolkit for efficient experimentation with Speech Recognition, Text2Speech and NLP
Stars: ✭ 1,378 (+36.3%)
Mutual labels:  speech-recognition, speech-to-text, speech-synthesis
speechrec
a simple speech recognition app using the Web Speech API Interfaces
Stars: ✭ 18 (-98.22%)
Mutual labels:  speech-synthesis, speech-recognition, speech-to-text
leon
🧠 Leon is your open-source personal assistant.
Stars: ✭ 8,560 (+746.69%)
Mutual labels:  speech-synthesis, speech-recognition, speech-to-text
Discordspeechbot
A speech-to-text bot for discord with music commands and more using NodeJS. Ideally for controlling your Discord server using voice commands, can also be useful for hearing-impaired people.
Stars: ✭ 35 (-96.54%)
Mutual labels:  voice-commands, speech-recognition, speech-to-text

Update for Chrome 71

Due to abuse of users with the Speech Synthesis API (ADS, Fake system warnings), Google decided to remove the usage of the API in the browser when it's not triggered by an user gesture (click, touch etc.). This means that calling for example artyom.say("Hello") if it's not wrapped inside an user event won't work.

So on every page load, the user will need to click at least once time per page to allow the usage of the API in the website, otherwise the following exception will be raised: "[Deprecation] speechSynthesis.speak() without user activation is no longer allowed since M71, around December 2018. See https://www.chromestatus.com/feature/5687444770914304 for more details"

For more information, visit the bug or this entry in the forum. To bypass this error, the user will need to interact manually with the website at least once, for example with a click:

<button id="btn">Allow Voice Synthesis</button>
<script src="artyom.window.js"></script>
<script>
    var Jarvis = new Artyom();
    
    // Needed user interaction at least once in the website to make
    // it work automatically without user interaction later... thanks google .i.
    document.getElementById("btn").addEventListener("click", function(){
        Jarvis.say("Hello World !");
    }, false);
</script>

Table of Contents

About Artyom

Artyom.js is a robust and useful wrapper of the webkitSpeechRecognition and speechSynthesis APIs. Besides, artyom allows you to add dynamic commands to your web app (website).

Artyom is constantly updated with new gadgets and awesome features, so be sure to star and watch this repository to be aware of any update. The main features of Artyom are:

Speech Recognition

  • Quick recognition of voice commands.
  • Add commands easily.
  • Smart commands (usage of wildcards and regular expressions).
  • Create a dictation object to convert voice to text easily.
  • Simulate commands without microphone.
  • Execution keyword to execute a command immediately after the use of the keyword.
  • Pause and resume command recognition.
  • Artyom has available the soundex algorithm to increase the accuracy of the recognition of commands (disabled by default).
  • Use a remote command processor service instead of local processing with Javascript.
  • Works both in desktop browser and mobile device.

Voice Synthesis

  • Synthesize extreme huge blocks of text (+20K words according to the last test).
  • onStart and onEnd callbacks will be always executed independently of the text length.
  • Works both in desktop browser and mobile device.

Read the changelog to be informed about changes and additions in Artyom.js

Installation

NPM

npm install artyom.js

Bower

bower install artyom.js

Or just download a .zip package with the source code, minified file and commands examples : download .zip file

How to use

Artyom is totally written in TypeScript, but it's transpiled on every version to JavaScript. 2 files are built namely artyom.js (used with Bundlers like Webpack, Browserify etc.) and artyom.window.js (only for the web browser). As everyone seems to use a bundler nowadays, for the module loader used is CommonJS:

// Using the /build/artyom.js file
import Artyom from './artyom.js';

const Jarvis = new Artyom();

Jarvis.say("Hello World !");

Alternatively, if you are of the old school and just want to use it with a script tag, you will need to use the artyom.window.js file instead:

<script src="artyom.window.js"></script>
<script>
    var Jarvis = new Artyom();

    Jarvis.say("Hello World !");
</script>

The source code of artyom handles a single TypeScript file /source/artyom.ts.

Basic usage

Writing code with artyom is very simple:

// With ES6,TypeScript etc
import Artyom from './artyom.js';

// Create a variable that stores your instance
const artyom = new Artyom();

// Or if you are using it in the browser
// var artyom = new Artyom();// or `new window.Artyom()`

// Add command (Short code artisan way)
artyom.on(['Good morning','Good afternoon']).then((i) => {
    switch (i) {
        case 0:
            artyom.say("Good morning, how are you?");
        break;
        case 1:
            artyom.say("Good afternoon, how are you?");
        break;            
    }
});

// Smart command (Short code artisan way), set the second parameter of .on to true
artyom.on(['Repeat after me *'] , true).then((i,wildcard) => {
    artyom.say("You've said : " + wildcard);
});

// or add some commandsDemostrations in the normal way
artyom.addCommands([
    {
        indexes: ['Hello','Hi','is someone there'],
        action: (i) => {
            artyom.say("Hello, it's me");
        }
    },
    {
        indexes: ['Repeat after me *'],
        smart:true,
        action: (i,wildcard) => {
            artyom.say("You've said : "+ wildcard);
        }
    },
    // The smart commands support regular expressions
    {
        indexes: [/Good Morning/i],
        smart:true,
        action: (i,wildcard) => {
            artyom.say("You've said : "+ wildcard);
        }
    },
    {
        indexes: ['shut down yourself'],
        action: (i,wildcard) => {
            artyom.fatality().then(() => {
                console.log("Artyom succesfully stopped");
            });
        }
    },
]);

// Start the commands !
artyom.initialize({
    lang: "en-GB", // GreatBritain english
    continuous: true, // Listen forever
    soundex: true,// Use the soundex algorithm to increase accuracy
    debug: true, // Show messages in the console
    executionKeyword: "and do it now",
    listen: true, // Start to listen commands !

    // If providen, you can only trigger a command if you say its name
    // e.g to trigger Good Morning, you need to say "Jarvis Good Morning"
    name: "Jarvis" 
}).then(() => {
    console.log("Artyom has been succesfully initialized");
}).catch((err) => {
    console.error("Artyom couldn't be initialized: ", err);
});

/**
 * To speech text
 */
artyom.say("Hello, this is a demo text. The next text will be spoken in Spanish",{
    onStart: () => {
        console.log("Reading ...");
    },
    onEnd: () => {
        console.log("No more text to talk");

        // Force the language of a single speechSynthesis
        artyom.say("Hola, esto está en Español", {
            lang:"es-ES"
        });
    }
});

All you need to know about Artyom

Do not hesitate to create a ticket on the issues area of the Github repository for any question, problem or inconvenient that you may have about artyom.

Development

Building Artyom from source

On every update, we build the latest version that can be retrieved from /build (for the browser and module). However, if you are willing to create your own version of Artyom, you would just need to modify the source file /source/artyom.ts and generate the build files using the following commands.

If you want to create the Browser version, you will need as first remove the export default keywords at the beginning of the class and run then the following command:

npm run build-artyom-window

If you want to create the Module version with CommonJS (for webpack, browserify etc) just run:

npm run build-artyom-module

Testing

If you're interested in modifying or working with Artyom, or you just simply want to test it quickly in your environment, we recommend you to use the little Sandbox utility of Artyom. Using Webpack, the Artyom Sandbox creates an HTTPS server accessible at https://localhost:3000, here Artyom will be accesible in Continuous mode too.

Start by cloning the repository of artyom:

git clone https://github.com/sdkcarlos/artyom.js/
cd artyom.js

Switch to the sandbox directory:

cd sandbox

Then install the dependencies:

npm install

And start the Webpack dev server using:

npm start

and finally access to the https://localhost:3000 address from your browser and you will see a little UI interface to interact with Artyom. This is only meant to work on Artyom, so it still in development.

Languages

Artyom provides complete support for the following languages. Every language needs an initialization code that needs to be provided in the lang property at the initialization.

Description Code for initialization
Supported language English (USA)
English (Great Britain) Great Britain
en-US
en-GB
Supported language Español es-ES
Supported language Deutsch (German) de-DE
Supported language Italiano it-IT
Supported language Français fr-FR
Supported language Japanese 日本人 ja-JP
Supported language Russian ru-RU
Supported language Brazil pt-PT
Supported language Dutch (netherlands) nl-NL
Supported language Polski (polonia) pl-PL
Supported language Indonesian (Indonesia) id-ID
Supported language Chinese (Cantonese[ 粤語(香港)]
Mandarin[普通话(中国大陆)])
Cantonese
zh-HK
Mandarin
zh-CN
Supported language Hindi (India) hi-IN

Demonstrations

Thanks

Working with artyom is cool and easy, read the documentation to discover more awesome features.

Thanks for visiting the repository !

Artyom example use

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].