audio.py 621 B

1234567891011121314151617
  1. from aphrodite.inputs.registry import InputContext
  2. from aphrodite.multimodal.base import MultiModalInputs, MultiModalPlugin
  3. class AudioPlugin(MultiModalPlugin):
  4. """Plugin for audio data."""
  5. def get_data_key(self) -> str:
  6. return "audio"
  7. def _default_input_mapper(self, ctx: InputContext,
  8. data: object) -> MultiModalInputs:
  9. raise NotImplementedError("There is no default audio input mapper")
  10. def _default_max_multimodal_tokens(self, ctx: InputContext) -> int:
  11. raise NotImplementedError(
  12. "There is no default maximum multimodal tokens")