Skip to content

PhraseSpeaker: Effortlessly dictate specific sections of text files with macOS's text-to-speech. Perfect for navigating and audibly extracting key content from large documents!

License

Notifications You must be signed in to change notification settings

augustweinbren/PhraseSpeaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PhraseSpeaker

PhraseSpeaker is a simple yet powerful bash script designed to read text from a specified file and use macOS's text-to-speech capabilities to audibly dictate content found between two defined phrases. It's an excellent tool for extracting and listening to specific sections from large text files, such as documents, transcripts, or code files.

Features

  • Extracts text from a file between two user-specified phrases.
  • Handles files with complex structures, including varying spaces and newline characters.
  • Utilizes macOS's native say command for clear and natural dictation.

Prerequisites

  • macOS (The script uses macOS's native say command)
  • A text file from which you want to extract and dictate text.

Installation

  1. Download the PhraseSpeaker.sh script.

  2. Give execute permissions to the script:

    chmod +x PhraseSpeaker.sh

Usage

Run the script with three arguments: the start phrase, the end phrase, and the file name. For example:

./PhraseSpeaker.sh "Start Phrase" "End Phrase" "yourfile.txt"
  • Start Phrase: The phrase where dictation should begin.
  • End Phrase: The phrase where dictation should end.
  • File Name: The path to the text file from which to read.

Example

To dictate text from a file named example.txt between the phrases "Hello World" and "Goodbye World", use:

./PhraseSpeaker.sh "Hello World" "Goodbye World" "example.txt"

Contributing

Contributions, issues, and feature requests are welcome!

License

Distributed under the MIT License.

About

PhraseSpeaker: Effortlessly dictate specific sections of text files with macOS's text-to-speech. Perfect for navigating and audibly extracting key content from large documents!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages