Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 865 Bytes

README.md

File metadata and controls

31 lines (27 loc) · 865 Bytes

did-you-mean-bing

Use search engine to correct results from speech recognition. Currently leverages Bing's Did you mean. Vevo. Spotify.

Usage

yarn add SayMosaic/did-you-mean-bing
const { didYouMean, aggressiveDidYouMeanSpotify } = require('did-you-mean-bing')

APIs

didYouMean, returns corrected query, return null when query is already accuracy

didYouMean('play fireworks by katy perry')
// 'play firework by katy perry'

aggressiveDidYouMeanSpotify , aggressively finds a track/album/artist/playlist on spotify. Returns the item with its spotify id, and type. If it's a playlist, userId will also be returned.

aggressiveDidYouMeanSpotify('play fireworks by katy perry')
// {type: 'track', id: '1mXuMM6zjPgjL4asbBsgnt'}

Performance and Accuracy

Run test,

yarn run test

License

Apache License 2.0