Skip to content

Node JS script for generating mp3 files that help with memorizing a text

License

Notifications You must be signed in to change notification settings

artisanphil/audiomemory

Repository files navigation

AudioMemory

The mp3 files generated by this tool help with learning texts through listening and prompting.

Whether you are doing housework, exercise or on your commute, you can listen to the computer generated sound files to help you memorize passages, homework, texts for language learning etc. The text gets split into manageable portions and converted into natural-sounding speech with audio prompts.

Setup Google Application Credentials

Create a service if you don't already have one https://cloud.google.com/docs/authentication/getting-started#create-service-account-console

Go to the API Console Credentials page.

From the project drop-down, select your project.

On the Credentials page, select the Create credentials drop-down, then select Service account key.

From the Service account drop-down, select an existing service account or create a new one.

For Key type, select the JSON key option, then select Create. The file automatically downloads to your computer.

Rename the downloaded json file to service_key.json file and move it to the root directory of your project.

Installation

Install Docker

Under Docker -> Preferences... -> Resources -> File Sharing, add the path to the root folder of the project.

Go to the root of the project and run:

docker compose up -d

Generating the mp3 files

Make sure the Docker container is running (see installation).

Add your text to generate/input.txt. Add line breaks so that each line is short enough for repetition.

To generate the output run this:

docker exec -it audiomemory node generate/index.js 

The generated files can be found in the output folder.

About

Node JS script for generating mp3 files that help with memorizing a text

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published