This tool can take a long script (greater than 10 hours) of diarized content and improve the diarization by prompting an LLM model to look for obviously incorrect attribution and fix it.
Project description
improve-diarization-with-llm
Install
pip install improve_diarization_with_llm
How to use
import os
from improve_diarization_with_llm import claude_corrector
os.environ['ANTHROPIC_API_KEY'] = 'your-api-key' # Replace with your actual API key
input_file = 'path/to/your/input/transcript.txt' # Replace with your actual input file path
output_file = 'path/to/your/output/improved_transcript.txt' # Replace with your desired output file path
corrector = claude_corrector.ClaudeDiarizationCorrector(input_file, output_file)
# corrector.process_conversation() this assumes a valid ANTHROPIC_API_KEY environment variable and input path
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file improve_diarization_with_llm-0.0.2.tar.gz.
File metadata
- Download URL: improve_diarization_with_llm-0.0.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e03a5942f43cb73ee21fad09d9badfe98f9c70294d3d411678b96255425d7850
|
|
| MD5 |
591fee565b73cd79dcfe35981d96f68a
|
|
| BLAKE2b-256 |
b8f29983cacd2a2180a39d55895c26aec6784d5a638955c2ebeb7d8413371667
|
File details
Details for the file improve_diarization_with_llm-0.0.2-py3-none-any.whl.
File metadata
- Download URL: improve_diarization_with_llm-0.0.2-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3593763b28a886103830a6a8a8a3759f56632d2c5590a67f3b82bdf2ef4bd30f
|
|
| MD5 |
aa7bf8da034314236d52549c4e637e4e
|
|
| BLAKE2b-256 |
f5e5435cd92950fa5c934c556c2f8dab8b5b8941ca2e9575cd637722968db190
|