"""Domain-specific plugin interface for audio transcription plugins"""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/plugin_interface.ipynb.

# %% auto 0
__all__ = ['TranscriptionPlugin']

# %% ../nbs/plugin_interface.ipynb 3
from abc import ABC, abstractmethod
from dataclasses import dataclass, field
import logging
from typing import Optional, Dict, Any, Union, List, Tuple, Generator, Type
from pathlib import Path

# Import generic plugin infrastructure from cjm-plugin-system
from cjm_plugin_system.core.interface import PluginInterface
from cjm_plugin_system.core.metadata import PluginMeta
from cjm_plugin_system.utils.validation import (
    dict_to_config, config_to_dict, validate_config,
    SCHEMA_TITLE, SCHEMA_DESC, SCHEMA_MIN, SCHEMA_MAX, SCHEMA_ENUM
)

# Import domain-specific types
from .core import AudioData, TranscriptionResult

# %% ../nbs/plugin_interface.ipynb 4
class TranscriptionPlugin(PluginInterface):
    """Transcription-specific plugin interface.
    
    This extends the generic PluginInterface with transcription-specific
    requirements like supported audio formats and the execute signature.
    
    All transcription plugins must implement this interface.
    """

    entry_point_group = "transcription.plugins"
    
    @property
    @abstractmethod
    def supported_formats(
        self
    ) -> List[str]:  # List of file extensions without the dot (e.g., ['wav', 'mp3', 'flac'])
        """List of supported audio formats."""
        pass
    
    @abstractmethod
    def execute(
        self,
        audio: Union[AudioData, str, Path],  # Audio data (AudioData object), file path (str), or Path object
        **kwargs  # Additional plugin-specific parameters (e.g., language, model)
    ) -> TranscriptionResult:  # Transcription result with text, confidence, segments, and metadata
        """Transcribe audio to text."""
        pass
