A flexible plugin system for audio transcription intended to make it easy to add support for multiple backends.
Project description
cjm-transcription-plugin-system
Install
pip install cjm_transcription_plugin_system
Project Structure
nbs/
├── core.ipynb # REMOVE-AFTER-OVERHAUL(option-c-cascade): class-identical legacy
├── forced_alignment_core.ipynb # REMOVE-AFTER-OVERHAUL(option-c-cascade): class-identical legacy
├── forced_alignment_interface.ipynb # Domain-specific plugin interface for word-level audio-text alignment
├── forced_alignment_storage.ipynb # REMOVE-AFTER-OVERHAUL(option-c-cascade): class-identical legacy
├── plugin_interface.ipynb # Domain-specific plugin interface for audio transcription
└── storage.ipynb # REMOVE-AFTER-OVERHAUL(option-c-cascade): class-identical legacy
Total: 6 notebooks
Module Dependencies
graph LR
core["core<br/>Core Data Structures (compat shim)"]
forced_alignment_core["forced_alignment_core<br/>Forced Alignment Core (compat shim)"]
forced_alignment_interface["forced_alignment_interface<br/>Forced Alignment Plugin Interface"]
forced_alignment_storage["forced_alignment_storage<br/>Forced Alignment Storage (compat shim)"]
plugin_interface["plugin_interface<br/>Transcription Plugin Interface"]
storage["storage<br/>Transcription Storage (compat shim)"]
forced_alignment_interface --> forced_alignment_core
plugin_interface --> core
2 cross-module dependencies detected
CLI Reference
No CLI commands found in this project.
Module Overview
Detailed documentation for each module in the project:
Forced Alignment Plugin Interface (forced_alignment_interface.ipynb)
Domain-specific plugin interface for word-level audio-text alignment
Import
from cjm_transcription_plugin_system.forced_alignment_interface import (
ForcedAlignmentPlugin
)
Classes
class ForcedAlignmentPlugin(PluginInterface):
"""
Abstract base class for all forced alignment plugins.
Extends PluginInterface with forced-alignment-specific requirements:
- `supported_formats`: List of audio file extensions this plugin can handle
- `execute`: Accepts an audio file path and transcript text, returns ForcedAlignResult
Input contract: plugins receive a path to a decodable audio file. Producing a
model-ready file (format / sample-rate / channel normalization) is the caller's
responsibility — e.g. an upstream ffmpeg step in the orchestration pipeline —
not the plugin's. This keeps the interface library dependency-light.
"""
def supported_formats(self) -> List[str]: # e.g., ['wav', 'mp3', 'flac']
"""List of supported audio file extensions (without the dot)."""
...
@abstractmethod
def execute(
self,
audio: Union[str, Path], # Path to a decodable audio file
text: str, # Transcript text to align against
**kwargs
) -> ForcedAlignResult: # Word-level alignment result
"List of supported audio file extensions (without the dot)."
def execute(
self,
audio: Union[str, Path], # Path to a decodable audio file
text: str, # Transcript text to align against
**kwargs
) -> ForcedAlignResult: # Word-level alignment result
"Perform forced alignment of text against audio.
`audio` is a path to a decodable audio file; the caller guarantees it is in
a form the plugin/model can consume."
Transcription Plugin Interface (plugin_interface.ipynb)
Domain-specific plugin interface for audio transcription
Import
from cjm_transcription_plugin_system.plugin_interface import (
TranscriptionPlugin
)
Classes
class TranscriptionPlugin(PluginInterface):
"""
Abstract base class for all transcription plugins.
Extends PluginInterface with transcription-specific requirements:
- `supported_formats`: List of audio file extensions this plugin can handle
- `execute`: Accepts an audio file path (str or Path), returns TranscriptionResult
Input contract: plugins receive a path to a decodable audio file. Producing a
model-ready file (format / sample-rate / channel normalization) is the caller's
responsibility — e.g. an upstream ffmpeg step in the orchestration pipeline —
not the plugin's. This keeps the interface library dependency-light (no audio
I/O deps such as numpy/soundfile in the shared consumer environment).
"""
def supported_formats(self) -> List[str]: # e.g., ['wav', 'mp3', 'flac']
"""List of supported audio file extensions (without the dot)."""
...
@abstractmethod
def execute(
self,
audio: Union[str, Path], # Path to a decodable audio file
**kwargs
) -> TranscriptionResult: # Transcription result with text, confidence, segments
"List of supported audio file extensions (without the dot)."
def execute(
self,
audio: Union[str, Path], # Path to a decodable audio file
**kwargs
) -> TranscriptionResult: # Transcription result with text, confidence, segments
"Transcribe audio to text.
`audio` is a path to a decodable audio file; the caller guarantees it is in
a form the plugin/model can consume."
Project details
Release history Release notifications | RSS feed
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 cjm_transcription_plugin_system-0.0.33.tar.gz.
File metadata
- Download URL: cjm_transcription_plugin_system-0.0.33.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e280f1e636a4d2e0122de9b9e5a7aa79c829bc34cc873fb36db7fc4558a10bcc
|
|
| MD5 |
b5535ba43b6af03f08614612fd49f2a7
|
|
| BLAKE2b-256 |
bc515bef0d79c3f7e27e6a38239cc3f8707061a5c260f7f3ffd810d56e76a723
|
File details
Details for the file cjm_transcription_plugin_system-0.0.33-py3-none-any.whl.
File metadata
- Download URL: cjm_transcription_plugin_system-0.0.33-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3467842c00a30229ed8432bfb1334833c326936224d9d8b1ead90b579377bfa6
|
|
| MD5 |
f5c8c6d8e7fe62cb585f407602126c25
|
|
| BLAKE2b-256 |
5cd4c5314328e1c74ffea09703076362ebda0bbaaff161a4582e8544e44fe83d
|