Skip to content

breno12321/Watson-Synthesizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Watson Text 2 Speech API πŸ—¨πŸ—£

This is a simple API with a web interface to create comments and reproduce their audios throught the a web interface.

SUPORTS ONLY PTBR

webpage

Development environment

βš™Specs:

  • MySql: 8.0.22 (MySql Community Server - GPL)
  • Node: v12.18.4
  • Computer:
    • i5 6600k
    • 16GB DDR4 2400Mhz

Setup πŸ”¨

Requirements 🧰

  • NodeJS: >= v12.18.4
  • MySQL
  • IBM Watson t2s credentials - create a Watson T2S free tier account
  • Git
  • Recommend Linux Environment for this walk through

Step by step to execute πŸ’¨

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.

DocumentationπŸ“•

Postman documentation

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.

Application folder structure

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

Future improvements

  • 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

About

Watson synthesizer with simple Web UI 😊

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published