ys

yandex-speech

node.js module for Yandex speech systems (ASR & TTS)

Showing:

Popularity

Downloads/wk

47

GitHub Stars

40

Maintenance

Last Commit

3yrs ago

Contributors

6

Package

Dependencies

2

License

MIT

Type Definitions

Tree-Shakeable

No?

Readme

yandex-speech

node.js module for Yandex speech systems (ASR & TTS)

Install

npm install yandex-speech --save

Automatic Speech Recognition (simple)

Get API key: https://developer.tech.yandex.ru/

docs: http://api.yandex.ru/speechkit/cloud-api/doc/index.xml

var yandex_speech = require('yandex-speech');

yandex_speech.ASR({
    developer_key: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',    
    file: 'data/1.mp3',
    }, function(err, httpResponse, xml){
        if(err){
            console.log(err);
        }else{
            console.log(httpResponse.statusCode, xml)
        }
    }
);

Streaming is also supported

var yandex_speech = require('yandex-speech');

require('fs').createReadStream('data/1.mp3').pipe(yandex_speech.ASR({
    developer_key: '3b7b9fba-cbcd-47d1-854a-b359ca0e5da7',
    debug: true,
    topic: 'queries'
    }, function (err, httpResponse, xml) {
        if (err) {
            console.log(err);
        } else {
            console.log(httpResponse.statusCode, xml)
        }
    }
));

Automatic Speech Recognition (full)

var yandex_speech = require('yandex-speech');

yandex_speech.ASR({
    developer_key: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX',  //get in Yandex Developer Center
    file: 'data/1.mp3', //check format
    uuid: '12345678123456781234567812345678',    //UUID without hyphens
    topic: 'queuries',  // ['queries', 'maps', 'notes', 'music']
    lang: 'ru-RU',      // ['ru-RU', 'tr-TR'],
    filetype: 'audio/x-mpeg-3'  // ['audio/x-speex', 'audio/x-pcm;bit=16;rate=8000', 'audio/x-pcm;bit=16;rate=16000', 'audio/x-alaw;bit=13;rate=8000', 'audio/x-wav', 'audio/x-mpeg-3']
    }, function(err, httpResponse, xml){
        if(err){
            console.log(err);
        }else{
            console.log(httpResponse.statusCode, xml)
        }
    }
);

Text-To-Speech

const yandex_speech = require('yandex-speech');

yandex_speech.TTS({
    developer_key: '3b7b9fba-cbcd-47d1-854a-b359ca0e5da7',
    text: 'Привет, мир!',
    file: 'data/hello.mp3'
}, () => {
    console.log('done');
}
);

#Links

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Tutorials

No tutorials found
Add a tutorial