Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/natanielf/lecsum
Automatically transcribe and summarize lecture recordings completely on-device using AI.
https://github.com/natanielf/lecsum
ollama ollama-python whisper whisper-ai
Last synced: 24 days ago
JSON representation
Automatically transcribe and summarize lecture recordings completely on-device using AI.
- Host: GitHub
- URL: https://github.com/natanielf/lecsum
- Owner: natanielf
- Created: 2024-10-05T19:04:10.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-22T22:56:55.000Z (about 2 months ago)
- Last Synced: 2024-11-22T23:25:26.345Z (about 2 months ago)
- Topics: ollama, ollama-python, whisper, whisper-ai
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lecsum
Automatically transcribe and summarize lecture recordings completely on-device using AI.
## Environment Setup
Install [Ollama](https://ollama.com/download).
Create a virtual Python environment:
```sh
python3 -m venv .venv
```Activate the virtual environment:
```sh
source .venv/bin/activate
```Install dependencies:
```sh
pip install -r requirements.txt
```## Configuration (optional)
Edit `lecsum.yaml`:
| **Field** | **Default Value** | **Possible Values** | **Description** |
| --------------- | ----------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| `whisper_model` | "base.en" | [Whisper model name](https://github.com/openai/whisper#available-models-and-languages) | Specifies which Whisper model to use for transcription |
| `ollama_model` | "llama3.1:8b" | [Ollama model name](https://ollama.com/library) | Specifies which Ollama model to use for summarization |
| `prompt` | "Summarize: " | Any string | Instructs the large language model during the summarization step |## Usage
Run the Ollama server:
```sh
ollama serve
```### Command-line
In a new terminal, run:
```sh
./lecsum.py -c [CONFIG_FILE] [AUDIO_FILE]
```Use any file format supported by [Whisper](https://platform.openai.com/docs/guides/speech-to-text) (`mp3`, `mp4`, `wav`, `webm`, etc.).
### Server
To start the `lecsum` server in a development environment, run:
```sh
fastapi dev server.py
```## References
- https://pyyaml.org/wiki/PyYAMLDocumentation
- https://github.com/openai/whisper
- https://github.com/ollama/ollama-python
- https://fastapi.tiangolo.com