DEV Community

Cover image for Me and ChatGPT created a Bash script for text-to-speech using OpenAI TTS
Vladimir Ignatev
Vladimir Ignatev

Posted on

Me and ChatGPT created a Bash script for text-to-speech using OpenAI TTS

Hi Dev.to community!

ChatGPT became an essential helper in writing and analyzing a code. But this specific case makes ChatGPT incredibly helpful!

If you caught yourself crunching the Bash syntax to make a handy automation on your Linux or Mac, you should hire ChatGPT.

Just look at the output below! I asked GPT to create a text-to-speech Bash script that works similar to say command on Linux. It took just a minute to build this useful, flexible and beautiful CLI tool out of an idea.

Quick tip: How to create a Bash/Python/etc. script using ChatGPT

  1. Start by asking to create a basic script. Do not provide details on what the script will do. Just tell more about script interface: CLI arguments, parameters, environmental variables etc.
  2. Tell ChatGPT apply necessary modifications and improvements to make this script do the actual workload. Provide sample code and ask to integrate some code pieces found over the web if needed.
  3. Well done!

Read the full story in Medium.

Top comments (0)