{"id":42709062,"url":"https://github.com/pprobst/escriba","last_synced_at":"2026-01-29T15:05:16.035Z","repository":{"id":294917967,"uuid":"988470463","full_name":"pprobst/escriba","owner":"pprobst","description":"Messing around with speech-to-text using Whisper and Gemini.","archived":false,"fork":false,"pushed_at":"2025-05-22T16:57:23.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-22T18:05:19.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pprobst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-22T15:38:14.000Z","updated_at":"2025-05-22T16:57:26.000Z","dependencies_parsed_at":"2025-05-22T18:06:39.739Z","dependency_job_id":"9d8a7382-9929-4cae-94a5-3101219097e8","html_url":"https://github.com/pprobst/escriba","commit_stats":null,"previous_names":["pprobst/escriba"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pprobst/escriba","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprobst%2Fescriba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprobst%2Fescriba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprobst%2Fescriba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprobst%2Fescriba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pprobst","download_url":"https://codeload.github.com/pprobst/escriba/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pprobst%2Fescriba/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28880017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-29T15:04:59.484Z","updated_at":"2026-01-29T15:05:16.029Z","avatar_url":"https://github.com/pprobst.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# escriba\nAudio transcription API.\n\n## Requirements\n- Python \u003e=3.11 \n- uv\n- Google (Gemini) API key\n\n## Setup\n\n1. Create a `.env` file with your Google API key:\n   ```\n   GOOGLE_API_KEY=your_api_key_here\n   ```\n\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n   or \n   ```bash\n   uv sync\n   ```\n\n3. Run the API server:\n   ```bash\n   uvicorn app.main:app --reload --host 0.0.0.0 --port 8000\n   ```\n\n4. Access the API at http://localhost:8000\n\n5. Run the Streamlit interface:\n   ```bash\n   streamlit run streamlit_app.py\n   ```\n\n## API Endpoints\n\n- `POST /generate/`: Stream text from audio transcription. Supports both Gemini and Groq transcription models.\n  ```json\n  {\n    \"audio_base64\": \"Base64 encoded audio data\",\n    \"model_name\": \"gemini-2.5-flash-preview-05-20\",\n    \"template_name\": \"transcription.jinja2\",\n    \"template_vars\": {\n      \"language\": \"en\",\n      \"context\": \"radiology\",\n      \"previous_context\": \"two centimeter mass in the right lung\",\n      \"instructions\": [\n        \"Include medical terminology as spoken\",\n        \"Preserve technical medical terms exactly as spoken\"\n      ]\n    }\n  }\n  ```\n\n- `GET /templates/`: List all available prompt templates\n\n- `GET /`: API information endpoint\n\n- `GET /docs`: OpenAPI docs\n\n## Project Structure\n\n```\n.\n├── app/                             # Main application package\n│   ├── __init__.py                  # Package initialization\n│   ├── main.py                      # Application entry point\n│   ├── api/                         # API layer\n│   │   ├── __init__.py\n│   │   ├── endpoints.py             # API endpoint handlers\n│   │   ├── models.py                # Request/response models\n│   │   └── routes.py                # Route configuration\n│   ├── core/                        # Core functionality\n│   │   ├── __init__.py\n│   │   ├── config.py                # Application settings\n│   │   └── logger.py                # Logging module\n│   └── services/                    # External services\n│       ├── __init__.py\n│       ├── gemini.py                # Gemini API integration\n│       ├── groq.py                  # Groq API integration\n│       ├── prompt_templates.py      # Template handling\n│       └── transcription_service.py # Transcription service\n├── audio/                           # Directory for audio samples\n├── datasets/                        # Test datasets for benchmarking\n├── prompts/                         # Prompt templates\n│   └── transcription.jinja2         # Transcription template\n├── streamlit_app.py                 # Streamlit UI for testing\n├── requirements.txt                 # Production dependencies\n└── pyproject.toml                   # Project configuration\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprobst%2Fescriba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpprobst%2Fescriba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpprobst%2Fescriba/lists"}