Skip to content

Commit

Permalink
Merge pull request #30 from ajcwebdev/dev
Browse files Browse the repository at this point in the history
`--info` option, `whisper.cpp` repo fallback, and Server `curl` Examples
  • Loading branch information
ajcwebdev authored Oct 1, 2024
2 parents 4825dfd + cba319a commit 83a3363
Show file tree
Hide file tree
Showing 19 changed files with 929 additions and 358 deletions.
21 changes: 9 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ services:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- whisper
# - llama
- ollama
environment:
- OLLAMA_HOST=localhost
- OLLAMA_PORT=11434
whisper:
build:
context: ./whisper.cpp
Expand All @@ -22,15 +25,9 @@ services:
command: tail -f /dev/null
tty: true
stdin_open: true
# llama:
# build:
# context: ./llama.cpp
# dockerfile: Dockerfile
# volumes:
# - ./content:/app/content
# command: tail -f /dev/null
# tty: true
# stdin_open: true
ollama:
image: ollama/ollama
ports:
- "11434:11434"
volumes:
whisper:
# llama:
whisper:
65 changes: 37 additions & 28 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
- [OctoAI's Models](#octoais-models)
- [Llama.cpp](#llamacpp)
- [Transcription Options](#transcription-options)
- [Whisper.cpp](#whispercpp)
- [Deepgram](#deepgram)
- [Assembly](#assembly)
- [Whisper.cpp](#whispercpp)
- [Docker Compose](#docker-compose)
- [Alternative JavaScript Runtimes](#alternative-javascript-runtimes)
- [Prompt Options](#prompt-options)
- [Alternative Runtimes](#alternative-runtimes)
- [Docker Compose](#docker-compose)
- [Deno](#deno)
- [Bun](#bun)
- [Makeshift Test Suite](#makeshift-test-suite)
Expand Down Expand Up @@ -98,6 +99,12 @@ npm run as -- \
--prompt titles summary longChapters takeaways questions
```

Run on a podcast RSS feed and generate JSON info file with markdown metadata of each item:

```bash
npm run as -- --rss "https://ajcwebdev.substack.com/feed" --info
```

## Language Model (LLM) Options

Create a `.env` file and set API key as demonstrated in `.env.example` for either:
Expand Down Expand Up @@ -226,26 +233,6 @@ npm run as -- --video "https://www.youtube.com/watch?v=MORMZXEaONk" --llama

## Transcription Options

Create a `.env` file and set API key as demonstrated in `.env.example` for `DEEPGRAM_API_KEY` or `ASSEMBLY_API_KEY`.

### Deepgram

```bash
npm run as -- --video "https://www.youtube.com/watch?v=MORMZXEaONk" --deepgram
```

### Assembly

```bash
npm run as -- --video "https://www.youtube.com/watch?v=MORMZXEaONk" --assembly
```

Include speaker labels and number of speakers:

```bash
npm run as -- --video "https://ajc.pics/audio/fsjam-short.mp3" --assembly --speakerLabels
```

### Whisper.cpp

If neither the `--deepgram` or `--assembly` option is included for transcription, `autoshow` will default to running the largest Whisper.cpp model. To configure the size of the Whisper model, use the `--model` option and select one of the following:
Expand Down Expand Up @@ -273,15 +260,27 @@ Run `whisper.cpp` in a Docker container with `--whisperDocker`:
npm run as -- --video "https://www.youtube.com/watch?v=MORMZXEaONk" --whisperDocker base
```

## Docker Compose
### Deepgram

This will run both `whisper.cpp` and the AutoShow Commander CLI in their own Docker containers.
Create a `.env` file and set API key as demonstrated in `.env.example` for `DEEPGRAM_API_KEY`.

```bash
docker-compose run autoshow --video "https://www.youtube.com/watch?v=MORMZXEaONk" --whisperDocker base
npm run as -- --video "https://www.youtube.com/watch?v=MORMZXEaONk" --deepgram
```

Currently working on the `llama.cpp` Docker integration so the entire project can be encapsulated in one local Docker Compose file.
### Assembly

Create a `.env` file and set API key as demonstrated in `.env.example` for `ASSEMBLY_API_KEY`.

```bash
npm run as -- --video "https://www.youtube.com/watch?v=MORMZXEaONk" --assembly
```

Include speaker labels and number of speakers:

```bash
npm run as -- --video "https://ajc.pics/audio/fsjam-short.mp3" --assembly --speakerLabels
```

## Prompt Options

Expand Down Expand Up @@ -339,7 +338,17 @@ Include all prompt options:
npm run as -- --video "https://www.youtube.com/watch?v=MORMZXEaONk" --prompt titles summary longChapters takeaways questions
```

## Alternative JavaScript Runtimes
## Alternative Runtimes

### Docker Compose

This will run both `whisper.cpp` and the AutoShow Commander CLI in their own Docker containers.

```bash
docker-compose run autoshow --video "https://www.youtube.com/watch?v=MORMZXEaONk" --whisperDocker base
```

Currently working on the `llama.cpp` Docker integration so the entire project can be encapsulated in one local Docker Compose file.

### Bun

Expand Down
Loading

0 comments on commit 83a3363

Please sign in to comment.