Skip to content

Commit

Permalink
Updated icon and docs, errmsg for unimplemented reading from stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Mar 7, 2022
1 parent a19a102 commit 13ef7f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

<img src="icon.png" width="168" height="168" alt="hear" style="float: right; margin-left: 20px; margin-bottom: 20px;" align="right">
Expand All @@ -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

<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BDT58J7HYKAEE"><img align="right" src="https://www.paypalobjects.com/WEBSCR-640-20110306-1/en_US/i/btn/btn_donate_LG.gif" ></a>

`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).**

Expand Down Expand Up @@ -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
Expand Down
Binary file modified icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions src/Hear.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 13ef7f9

Please sign in to comment.