Syllables
Syllables are counted using the CMU Pronouncing Dictionary, which uses 4MB of storage.
Install
$ npm install syllables
Usage
const syllables = require('syllables');
syllables('Hello');
//=> 2
syllables('Hi, how are you?');
//=> 4
syllables('sjhljhah aiuoihdal ijiajl');
//=> 0
API
syllables(str)
str
Type: string
Word or sentence to count syllables of. Unrecognised words will have a syllable count of 0.