npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nuance

v1.1.1

Published

A simple Nuance HTTP Client for NodeJS.

Downloads

12

Readme

nuance-nodejs

A simple Nuance HTTP Client for NodeJS.

Installation

Use NPM:

npm install nuance --save

##Usage First, you need to create a new Nuance instance:

var Nuance = require("nuance");
var nuance = new Nuance(appID, appKey);

If you'd like to send a Text-To-Speech request, use the method sendTTSRequest as follow:

nuance.sendTTSRequest({
	"text": "hello world", //The text you would like to convert to speech.
	"output": "testFile.wav", //The output file.
	"outputFormat": "wav", //The codec you would like to use.
	"language": "en_US", //The language code (please refer to Nuance's documentation for more info).
	"voice": "Tom", //The voice you would like to use (please refer to Nuance's documentation for more info).
	"identifier": "randomIdentifierStringHere", //The user identifier (please refer to Nuance's documentation for more info).
	"success": function(){ //The success callback function.
		console.log("The file was saved.");
	},
	"error": function(response){ //The error callback function - returns the response from Nuance that you can debug.
		console.log("An error was occurred");
		console.log(response);
	}
});

If you'd like to send a Dictation request (Speech-To-Text), use the method sendDictationRequest as follow:

nuance.sendDictationRequest({
	"identifier": "randomIdentifierStringHere", //The user identifier (please refer to Nuance's documentation for more info).
	"language": "en-US", //The language code (please refer to Nuance's documentation for more info).
	"path": "audio.amr", //The path to the file you would like to send to Nuance.
	"additionalHeaders": {}, //If you'd like to supply more headers or replace the default headers, supply them here.
	"success": function(resp){ //The success callback function.
		console.log(resp);
	},
	"error": function(resp){ //The error callback function - returns the response from Nuance that you can debug.
		console.log("An error was occurred.");
		console.log(resp);
	}
});

##Notes

  1. If you receive error 500 with AUDIO_INFO - the headers you sent are probably wrong.
  2. Please make sure you are sending the right headers with the right language.
  3. Feel free to modify the default dictationHeaders in the nuance.js file, at the moment they are set to handle AMR files.
  4. You may also replace the default dictationHeaders by suppling additionalHeaders in the sendDictationRequest options, so you don't have to change the default headers in the nuance.js file.