audio-analysis-service
Audio convert/analysis service.
Features
- Read audio stream from url, convert to flac format, transcript to text with google cloud api
- Analysis text with google cloud NLP api
Prerequisites
- nodejs >= 8.10
- register google cloud account and set payment method, download your credential json.
dev
git clone git@github.com:zxdong262/audio-analysis-service.git#or git clone https://github.com/zxdong262/audio-analysis-service.git cd audio-analysis-service # install dependencies yarn # create config cp .sample.env .env# then edit .env, fill your google credential path ## start local server yarn dev
Build and Run in production env
# install pm2 first if you wanna use pm2 yarn global add pm2# or `npm i -g pm2` # build yarn build # run production server yarn prod-server # or use pm2 pm2 start bin/pm2.yml
Use as service
/text-analysis?text=text
for text analysis, including Sentiment, Syntax, Classification, Entity sentiment./audio-url-to-text
transcript audio url to text with google cloud ai./audio-url-analysis
for audio url analysis, will transform to flac first, then transcript to text, then use google cloud ai to anlaysis.
Use as lib
npm i audio-analysis-service
Test
yarn test
License
MIT