This module is a work in progress (obviously).
$ npm install aparrish/pronouncingjs
Or if you're using the browserified version, download
build directory and include it using a
This library has feature parity with
the Pronouncing Python module.
All of the examples in the Tutorial and
pronouncing.js use camelCase instead of underscores (e.g., Python's
Use the module in Node like so:
> var pronouncing = require('pronouncing'); undefined > pronouncing.phonesForWord("adverse") [ 'AE0 D V ER1 S', 'AE1 D V ER2 S', 'AE2 D V ER1 S' ] > pronouncing.syllableCount(pronouncing.phonesForWord("adverse")) 2 > pronouncing.rhymes("sinking") [ 'blinking', 'drinking', 'linking', 'plinking', 'rethinking', 'shrinking', 'stinking', 'thinking', 'unthinking', 'winking' ] > pronouncing.search("^S K R AE1") [ 'scrabble', 'scragg', 'scraggle', 'scraggly', ... output omitted for brevity ... 'scraps', 'scratching', 'scratchy', 'skramstad' ] > pronouncing.stresses(pronouncing.phonesForWord("snappiest")) '102' > pronouncing.searchStresses("^0000$") [ 'neopositivist', 'undercapitalize', 'undercapitalized' ]
A browserified version of the library is in
for an example of how it works!
Code in this module is distributed under an MIT license. The CMU pronouncing dictionary itself is included with this module, but has its own license; check the CMU Pronouncing Dictionary page for more information.
This package was originally developed as part of my Spring 2015 research fellowship at ITP. Thank you to the program and its students for their interest and support!