This is a simple API with a web interface to create comments and reproduce their audios throught the a web interface.
SUPORTS ONLY PTBR
βSpecs:
- MySql: 8.0.22 (MySql Community Server - GPL)
- Node: v12.18.4
- Computer:
- i5 6600k
- 16GB DDR4 2400Mhz
- NodeJS: >= v12.18.4
- MySQL
- IBM Watson t2s credentials - create a Watson T2S free tier account
- Git
- Recommend Linux Environment for this walk through
First of all, make sure your MySQL server is up and running - Docker enviroments make its use easier. Then you can clone the repository with:
git clone DESIRED_DIR_NAME [email protected]:breno12321/Watson-Synthesizer.git
Done clonning, you can now uncomment the env file, doing
cp .env.example .env
in the root directory and fill it with your config and credentials for the application:
- Watson text 2 Speech API key
- Watson text 2 Speech instance URL
- PORT for the server
- Database config:
- username - make sure to have the permissions already setup in MySQL
- password
- database name
- host
- NODEJS enviroment
After setting up the enviroment you can run:
npm run setup
it will create the database under development
config and migrate all the tables. Then, you can run
npm run dev
for development purposesπ¨βπ», watching http debug and hot reload for file modifications. But if you want to run it for normal use, run the command:
npm start
and it will startπ on http://localhost:6969
by default port.
IMPORTANT: Application currently supports only PTBR comments, but the provider for Watson T2S is already able to send voice just change the Comment create method
OBS.: If you want to do a clean start or make sure everything is ok to rebuild the environment, you can run
npm run cleanUp
it will drop the database and remove all audio files.
There is a collection for postman in /assets
folder, in which you can import and test some of the features of the api besides the webapp interaction.
src
βββ Audios
βββ app.js
βββ components
β βββ Comments
β β βββ Comments.controller.js
β β βββ Comments.js
β β βββ Comments.provider.js
β β βββ Comments.router.js
β βββ WatsonT2S
β βββ WatsonT2S.controller.js
β βββ WatsonT2S.js
β βββ WatsonT2S.provider.js
β βββ WatsonT2S.router.js
βββ db
β βββ config
β β βββ config.js
β βββ migrations
β β βββ 20201219143238-create-comments.js
β βββ models
β β βββ Comments.js
β β βββ index.js
β βββ seeders
βββ public
β βββ 30.gif
β βββ favicon.ico
β βββ index.html
β βββ loading.gif
β βββ script.js
β βββ style.css
βββ routes
β βββ index.js
βββ server.js
βββ utils
βββ ErrorHandler.js
βββ cleanUpAudios.js
- Tranfer it to TypeScript
- Implement Authentication
- Implement testing
- Implement an API control requests for monitor API consuption
- Create a more UX UI friendily interface with more modern design libs
- Setup a docker-compose file to make 200% easier to boot up the webapp using docker
- Add suport for more voices and languages