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

mmir-plugin-speech-nuance-lang

v1.1.1

Published

tools for querying supported languages (ASR and TTS) and voices (TTS) by Nuance / Cerence SpeechKit

Downloads

142

Readme

mmir-plugin-speech-nuance-lang

MIT license GitHub package.json version npm API Guides

tools for querying supported languages (ASR and TTS) and voices (TTS) by Nuance / Cerence Speech API

(internally uses mmir-plugin-lang-support)

Intialization

In cordova module plugin code:

// use corodva's require with exported main module ID:
var langTools = require('mmir-plugin-speech-nuance-lang.languageSupport');

// or global export:
var langTools = window.cordova.plugins.nuanceLanguageSupport.languageSupport;

...

As AMD module:

// use async require (or specify as define-dependency):
require('mmir-plugin-speech-nuance-lang/dist/languageSupport', function(langTools){

  ...
});

As CommonJS module:


// use synchronous require:
var langTools = require('mmir-plugin-speech-nuance-lang').languageSupport;

// or "deep link":
var langTools = require('mmir-plugin-speech-nuance-lang/www/languageSupport');

...

API

Exported functions for querying supported ASR and TTS languages and voices.


/** get list of supported TTS language codes */
langTools.ttsLanguages(): string[];
/** get list of supported TTS voice details (filtered by language code / gender) */
langTools.ttsVoices(langCode?: string, gender?: Gender): LabeledVoiceDetails[];
/** get list of supported TTS voice names (filtered by language code / gender) */
langTools.ttsVoiceNames(langCode?: string, gender?: Gender): string[];
/** get best matching voice result (for language / gender: may return different gender and/or country code, if no matching voice is available) */
langTools.ttsBestVoiceFor(langCode: string, gender?: Gender): VoiceResult;
/** get list of supported ASR language codes */
langTools.asrLanguages(): string [];
/** get best matching voice (for language / gender: may return different gender and/or country code, if no matching voice is available) */
langTools.ttsSelectVoice(langCode: string, query?: Gender | string): LabeledVoiceDetails;

interface VoiceResult {
  voice: LabeledVoiceDetails;
  language: string;
  filter: string;
}

interface LabeledVoiceDetails {
  /** the name of the voice */
  name: string;
  /** a (human readable) label for the voice (if not available, returns same value as the name) */
  label: string;
  /** the language (code) of the voice */
  language: string;
  /** the gender of the voice */
  gender: "female" | "male" | "unknown";
  /** if voice is locally available or requires network/internet access */
  local: boolean | undefined;
}

Integration Notes

for usage in cordova-plugins, copy /dist (AMD), /www (CommonJS), or /src (TypeScript) to the appropriate location in plugin project, e.g. via the exported function

const installFiles = require('mmir-plugin-speech-nuance-lang/install');

installFiles(srcDirType: "dist" | "src" | "www", targetDir: string, callback(err: Error | null))