Skip to content

Instantly share code, notes, and snippets.

@primaryobjects
Created March 13, 2023 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save primaryobjects/980921aab2deada3fbc879ad9249cbc5 to your computer and use it in GitHub Desktop.
Save primaryobjects/980921aab2deada3fbc879ad9249cbc5 to your computer and use it in GitHub Desktop.
Text to speech app created with ChatGPT. https://youtu.be/esq7vHKzwKA
const fs = require('fs');
const say = require('say');
// Read command line arguments
const args = process.argv.slice(2);
const fileName = args[0];
// Read the file contents
fs.readFile(fileName, 'utf8', (err, data) => {
if (err) throw err;
// Speak the contents of the file
say.speak(data);
});
Hello, this is my first time pair programming with ChatGPT. I sure hope it goes well!
{
"dependencies": {
"say": "^0.16.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment