"""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
import logging
from typing import Optional, Dict, Any, Union, List, Tuple, Generator
from pathlib import Path
import json

# Import generic plugin infrastructure from cjm-plugin-system
from cjm_plugin_system.core.interface import PluginInterface
from cjm_plugin_system.core.metadata import PluginMeta

# 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.
    """
    
    @property
    @abstractmethod
    def supported_formats(
        self
    ) -> List[str]:  # List of file extensions this plugin can process
        """List of supported audio formats (e.g., ['wav', 'mp3']).
        
        Returns:
            List of file extensions without the dot (e.g., ['wav', 'mp3', 'flac'])
        """
        pass
    
    @abstractmethod
    def execute(
        self,
        audio: Union[AudioData, str, Path],  # Audio data or path to audio file
        **kwargs  # Additional plugin-specific parameters
    ) -> TranscriptionResult:  # Transcription result with text and metadata
        """Transcribe audio to text.
        
        Args:
            audio: Audio data (AudioData object), file path (str), or Path object
            **kwargs: Additional plugin-specific parameters (e.g., language, model)
            
        Returns:
            TranscriptionResult containing transcribed text, confidence, segments, and metadata
        """
        pass
