UNPKG

computes-dictation

Version:
52 lines (36 loc) 1.23 kB
# Computes Dictation NPM Performs massively parallel transcription of audio files using Watson Speech-to-Text and Computes.io. ## Usage Computes.io kernel would look something like this: ```` // Watson Speech to Text var computes = require("computes"); var operation = "npm://computes-dictation@latest"; var options = { domain: "domain-key-provided-by-computesio", priority: "normal", //'low', 'normal' & 'high' ttl: 60000, // milliseconds delay: 0 //milliseconds }; var job = computes.connect(options.domain); job.on("ready", function (){ var params = { audioUrl: "https://www.dropbox.com/s/eflf4ola9c7kkxi/0.wav?dl=1", contentType: "audio/wav; rate=48000", username: "watson-username", password: "watson-password" }; job.compute(operation, params, options); }); job.on("result", function (results){ console.log(results.result); job.disconnect(); }); ```` ```` { result: 'the house has a thatched roof ' } ```` ## Reference documentation - [Computes.io](https://computes.io) - [Watson Speech-To-Text API Docs](https://watson-developer-cloud.github.io/node-sdk/conversation-v1/) - [Watson Audio formats](https://www.ibm.com/watson/developercloud/doc/speech-to-text/input.shtml)