synox / hear

Command line speech recognition for macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License Language Build

hear

hear

macOS speech recognition via the command line

hear is a command line interface for the built-in speech recognition capabilities in macOS.

Apple's macOS has long shipped with the say tool, a command line interface for the operating system's venerable speech synthesis capabilities. As of 10.15 "Catalina", it also ships with highly capable speech recognition for a variety of languages. This project is an attempt to provide a robust CLI for this functionality since no such tool is provided by Apple. hear supports speech recognition of both microphone audio and audio files in a variety of formats.

Download

hear is free, open source software. The source code is freely available under a BSD license. If you find this program useful, please make a donation.

Installation

After downloading and expanding the archive, change to the resulting directory and run the following command:

bash install.sh

This will install the binary into /usr/local/bin and the man page into /usr/local/share/man/man1/.

Usage

Transcribe audio from microphone

hear

From microphone in single line output mode

hear -m

Transcribe audio file

hear -i /path/to/someone_speaking.mp3 > transcribed_text.txt

See the man page for further documentation.

Build

To build hear from source, run the following command from the repository root (requires Xcode command line build tools):

make

The resulting binary is created in products/.

BSD License

Copyright (c) 2022 Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

Command line speech recognition for macOS

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Objective-C 79.0%Language:HTML 8.5%Language:Roff 5.9%Language:Makefile 5.2%Language:Shell 1.3%