Coder Social home page Coder Social logo

adisidev / hear Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sveinbjornt/hear

0.0 0.0 0.0 454 KB

Command line speech recognition and transcription for macOS

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

Shell 2.94% Objective-C 78.19% Makefile 5.46% HTML 7.87% Roff 5.54%

hear's Introduction

License Language Release 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. This makes it possible to transcribe spoken audio input or entire audio files.

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 and transcription of both microphone input and audio files in a variety of formats.

See the man page for further details.

Download

hear is free, open source software written in Objective-C. 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 (or default audio input device)

hear

From microphone in single line output mode

hear -m

Transcribe audio file

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

The -d flag specifies that only on-device speech recognition capabilities should be used. Otherwise, data may be sent to Apple servers, which as of writing (2022) have a hard limit of something like 500 characters before quitting.

Build

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

make build_unsigned

The resulting binary is created in products/.

Test

To run tests on the built command line tool, execute the following command from the repository root:

bash test/test.sh

BSD License

Copyright (c) 2022-2023 Sveinbjorn Thordarson <[email protected]>

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.

hear's People

Contributors

sveinbjornt avatar mryakobo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.