Skip to content

Commit

Permalink
Update readme with cli caching stuff, test running info
Browse files Browse the repository at this point in the history
  • Loading branch information
drien committed Oct 5, 2024
1 parent 27da730 commit 970d891
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,23 @@ The CLI expects to find an OpenAI API Key in a `OPENAI_API_KEY` environment vari
#### Syntax

```
ttsjoin [OPTIONS]
ttsjoin [OPTIONS] [COMMAND]
```

#### Options

```
Options:
--input-file FILENAME Plaintext file to process into speech, otherwise stdin
--output-file FILENAME MP3 result, otherwise stdout
--model TEXT Slug of the text-to-speech model to be used
--service TEXT API service (currently only supports openai)
--voice TEXT Slug of the voice to be used
--no-cache BOOLEAN Disable caching
--help Show this message and exit.
Commands:
cache [clear, show]
```

#### Examples
Expand All @@ -66,6 +70,12 @@ echo "Your text to be processed" | ttsjoin > output.mp3
ttsjoin --input-file input.txt --output-file output.mp3 --no-cache
```

5. Clear cache directory

```bash
ttsjoin cache clear
```

### Python Library

You can also use tts-joinery as part of your Python project:
Expand Down Expand Up @@ -93,6 +103,12 @@ tts.process_to_file('output.mp3')

## Changelog

#### v1.0.3 (2024-10-05)

- Added cache management commands to cli
- Fixed a bug when running
- Added end-to-end tests

#### v1.0.2 (2024-10-03)

- Fixed crash when running with caching disabled (#3)
Expand All @@ -101,6 +117,8 @@ tts.process_to_file('output.mp3')

Contributions welcome, particularly other TTS APIs, check the issues beforehand and feel free to open a PR. Code is formatted with Black.

Test can be run manually. Suite includes end-to-end tests with live API calls, ensure you have an OPENAI_API_KEY set in `.env.test`, and run `pytest`. You can install development dependencies with `pip install -e .[test]`

## Contributors

Special thanks to:
Expand Down

0 comments on commit 970d891

Please sign in to comment.