Mistral Voxtral plugin for the cjm-transcription-plugin-system library - provides local speech-to-text transcription through 🤗 Transformers with configurable model selection and parameter control.
Project description
cjm-transcription-plugin-voxtral-hf
Install
pip install cjm_transcription_plugin_voxtral_hf
Project Structure
nbs/
└── plugin.ipynb # Plugin implementation for Mistral Voxtral transcription through Hugging Face Transformers
Total: 1 notebook
Module Dependencies
graph LR
plugin[plugin<br/>Voxtral HF Plugin]
No cross-module dependencies detected.
CLI Reference
No CLI commands found in this project.
Module Overview
Detailed documentation for each module in the project:
Voxtral HF Plugin (plugin.ipynb)
Plugin implementation for Mistral Voxtral transcription through Hugging Face Transformers
Import
from cjm_transcription_plugin_voxtral_hf.plugin import (
VoxtralHFPluginConfig,
VoxtralHFPlugin
)
Functions
@patch
def supports_streaming(
self:VoxtralHFPlugin
) -> bool: # True if streaming is supported
"Check if this plugin supports streaming transcription."
@patch
def execute_stream(
self:VoxtralHFPlugin,
audio: Union[AudioData, str, Path], # Audio data or path to audio file
**kwargs # Additional plugin-specific parameters
) -> Generator[str, None, TranscriptionResult]: # Yields text chunks, returns final result
"Stream transcription results chunk by chunk."
Classes
@dataclass
class VoxtralHFPluginConfig:
"Configuration for Voxtral HF transcription plugin."
model_id: str = field(...)
device: str = field(...)
dtype: str = field(...)
language: Optional[str] = field(...)
max_new_tokens: int = field(...)
do_sample: bool = field(...)
temperature: float = field(...)
top_p: float = field(...)
streaming: bool = field(...)
trust_remote_code: bool = field(...)
cache_dir: Optional[str] = field(...)
compile_model: bool = field(...)
load_in_8bit: bool = field(...)
load_in_4bit: bool = field(...)
class VoxtralHFPlugin:
def __init__(self):
"""Initialize the Voxtral HF plugin with default configuration."""
self.logger = logging.getLogger(f"{__name__}.{type(self).__name__}")
self.config: VoxtralHFPluginConfig = None
"Mistral Voxtral transcription plugin via Hugging Face Transformers."
def __init__(self):
"""Initialize the Voxtral HF plugin with default configuration."""
self.logger = logging.getLogger(f"{__name__}.{type(self).__name__}")
self.config: VoxtralHFPluginConfig = None
"Initialize the Voxtral HF plugin with default configuration."
def name(
self
) -> str: # Plugin name identifier
"Get the plugin name identifier."
def version(
self
) -> str: # Plugin version string
"Get the plugin version string."
def supported_formats(
self
) -> List[str]: # List of supported audio formats
"Get the list of supported audio file formats."
def get_current_config(
self
) -> VoxtralHFPluginConfig: # Current configuration dataclass
"Return current configuration."
def get_config_dataclass() -> VoxtralHFPluginConfig: # Configuration dataclass
"""Return dataclass describing the plugin's configuration options."""
return VoxtralHFPluginConfig
def initialize(
self,
config: Optional[Any] = None # Configuration dataclass, dict, or None
) -> None
"Return dataclass describing the plugin's configuration options."
def initialize(
self,
config: Optional[Any] = None # Configuration dataclass, dict, or None
) -> None
"Initialize the plugin with configuration."
def execute(
self,
audio: Union[AudioData, str, Path], # Audio data or path to audio file to transcribe
**kwargs # Additional arguments to override config
) -> TranscriptionResult: # Transcription result with text and metadata
"Transcribe audio using Voxtral."
def is_available(
self
) -> bool: # True if Voxtral and its dependencies are available
"Check if Voxtral is available."
def cleanup(
self
) -> None
"Clean up resources with aggressive memory management."
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_voxtral_hf-0.0.8.tar.gz.
File metadata
- Download URL: cjm_transcription_plugin_voxtral_hf-0.0.8.tar.gz
- Upload date:
- Size: 14.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
886c4559a82cd44f64e27bcbd77b7370e6e45c676c1fee1f098a30b36eed9462
|
|
| MD5 |
cc4e1726001325e78149a34ac80229af
|
|
| BLAKE2b-256 |
14c5c81c30489ee11bfd0f0dca2d5d10983dd79596e956740a15076341d4f870
|
File details
Details for the file cjm_transcription_plugin_voxtral_hf-0.0.8-py3-none-any.whl.
File metadata
- Download URL: cjm_transcription_plugin_voxtral_hf-0.0.8-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f55ff1de4c1ee4cd361ef90f234df5d3383d99be333ee01204906eb32215330
|
|
| MD5 |
360581a0a2ef8c3cc888d50a1762db30
|
|
| BLAKE2b-256 |
4d4e115c8e720eec26c3a21cfef77c4f45f12b35f2d8e359cea9433155f8a26d
|