diff --git a/README.md b/README.md index 4d3fe71..314c3cb 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) +[![Language](https://img.shields.io/badge/language-objective--c-lightgrey)]() +[![Build](https://github.com/sveinbjornt/hear/actions/workflows/macos.yml/badge.svg)]() + # hear hear @@ -8,16 +12,16 @@ 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", macOS also ships with highly capable speech recognition for a variety +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 +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 +**hear** is free, open source software. The source code is freely [available](https://github.com/sveinbjornt/hear) under a [BSD license](#bsd-license). **If you find this program useful, please [make a donation](https://sveinbjorn.org/donations).** @@ -51,11 +55,6 @@ hear -m hear -i /path/to/someone_speaking.mp3 > transcribed_text.txt ``` -### Transcribe audio from standard input -``` -cat /path/to/audio_file.wav | hear -i - -f wav -``` - See the [man page](https://sveinbjorn.org/files/manpages/hear.1.html) for further documentation. ## Build diff --git a/icon.png b/icon.png index b9ddcd0..0a2607f 100644 Binary files a/icon.png and b/icon.png differ diff --git a/src/Hear.m b/src/Hear.m index 40f1177..590ffe9 100644 --- a/src/Hear.m +++ b/src/Hear.m @@ -44,6 +44,7 @@ @interface Hear() @property (nonatomic, retain) NSString *language; @property (nonatomic, retain) NSString *inputFile; @property (nonatomic, retain) NSString *inputFormat; +//@property (nonatomic, retain) NSString *tempFile; @property (nonatomic) BOOL useMic; @property (nonatomic) BOOL useOnDeviceRecognition; @property (nonatomic) BOOL singleLineMode; @@ -147,8 +148,9 @@ - (void)processFile { NSString *filePath = self.inputFile; if ([filePath isEqualToString:@"-"]) { - // TODO: Read from stdin and save to temp dir - // filePath = tmpPath + // TODO: Read from stdin and save to temp dir/feed to audio buffer processing? + NSPrintErr(@"Reading from standard input remains unimplemented"); + exit(EXIT_FAILURE); } else if ([[NSFileManager defaultManager] fileExistsAtPath:filePath] == NO) { NSPrintErr(@"No file at path %@", filePath); exit(EXIT_FAILURE);