How to use the node-record-lpcm16.start function in node-record-lpcm16

To help you get started, we’ve selected a few node-record-lpcm16 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rvowles / node-assistant / app / hotword.ts View on Github external
public start() {
		// this.setup();

		this.mic = record.start({
			threshold: 0,
			verbose: this.config.verbose,
			recordProgram: this.config.record.programme
		});

		this.mic.pipe(this.detector);

		console.log('waiting for hotword');
	}
github deermichel / spotify-recorder / recorder.js View on Github external
const recordAudio = (file) => new Promise((resolve, reject) => {
    const stream = fs.createWriteStream(file, { encoding: "binary" })
    record.start({
        // device: "",
        channels: 2,
        sampleRate: 44100,
        silence: "0:05",
        threshold: 0.01
        // verbose: true
    }).pipe(stream)
        .on("error", (error) => reject(error))
        .on("finish", () => resolve())
})
github shekit / peeqo-robot / electron / app / js / intent-engines / wit.js View on Github external
module.exports = function(){
	record.start().pipe(request.post({
		'url':'https://api.wit.ai/speech?client=chromium&lang=en-us&output=json',
		'headers':{
			'Accept'        : 'application/vnd.wit.20161219+json',
	    	'Authorization' : 'Bearer ' + config.wit.token,
	    	'Content-Type'  : 'audio/wav'
		}
	}, parseResult))

	function parseResult(err, resp, body){
		console.log(body)
	}
}
github patrickjquinn / P-Brain.ai-RasPi / client.js View on Github external
models.add({
    file: './resources/Brain.pmdl',
    sensitivity: '0.5',
    hotwords: 'brain'
})

const detector = new Detector({
    resource: './resources/common.res',
    models,
    audioGain: 1.0
})

const hotword = thunkify.event(detector, 'hotword')

const hotword_recorder = record.start({
    threshold: 0,
    verbose: false
})

function * parseResult(body) {
    try {
        body = JSON.parse(body[0].body)
        const query = body._text
        if (query && query !== '' && !is_recognizing) {
            is_recognizing = true
            const response = yield api.get(query)
            yield response_handler.handle(response)
            is_recognizing = false
        }
    } catch (err) {
        console.log(err)
github rvowles / node-assistant / app / snowboy.ts View on Github external
public start() {
		this.mic = record.start({
			threshold: 0,
			verbose: this.config.verbose,
			recordProgram: this.config.record.programme
		});

		this.mic.pipe(this.detector);

		console.log('waiting for hotword');
	}
github gigagenie / ai-makers-kit / nodejs / ex2_getVoice2Text.js View on Github external
function initMic(){
        return record.start({
                sampleRateHertz: 16000,
                threshold: 0,
                verbose: false,
                recordProgram: 'arecord',
                silence: '10.0',
        })
};
let writeFlag=0;
github gigagenie / ai-makers-kit / nodejs / ex6_queryByVoice.js View on Github external
function initMic(){
        return record.start({
                sampleRateHertz: 16000,
                threshold: 0,
                verbose: false,
                recordProgram: 'arecord',
                silence: '10.0',
        })
};
github gigagenie / ai-makers-kit / nodejs / ex7_kwsstt.js View on Github external
function initMic(){
        return record.start({
                sampleRateHertz: 16000,
                threshold: 0,
                verbose: false,
                recordProgram: 'arecord',
        })
};
ktkws.initialize('../data/kwsmodel.pack');
github gigagenie / ai-makers-kit / nodejs / ex8_kwssttdss.js View on Github external
function initMic(){
        return record.start({
                sampleRateHertz: 16000,
                threshold: 0,
                verbose: false,
                recordProgram: 'arecord',
        })
};
ktkws.initialize('../data/kwsmodel.pack');
github gigagenie / ai-makers-kit / nodejs / ex10_kwsstt_youtube.js View on Github external
function initMic(){
        return record.start({
                sampleRateHertz: 16000,
                threshold: 0,
                verbose: false,
                recordProgram: 'arecord',
        })
};
ktkws.initialize('../data/kwsmodel.pack');

node-record-lpcm16

Record a microphone input stream

ISC
Latest version published 5 years ago

Package Health Score

51 / 100
Full package analysis

Popular node-record-lpcm16 functions