EmbeddingGemma2AudioConverter classkeras_hub.layers.EmbeddingGemma2AudioConverter(
num_mels=128,
num_fft_bins=512,
stride=160,
sampling_rate=16000,
max_audio_length=30,
min_frequency=0.0,
max_frequency=8000.0,
mel_floor=1e-05,
per_bin_mean=None,
per_bin_stddev=None,
frame_length=320,
**kwargs
)
EmbeddingGemma2 audio converter.
This converter is a subclass of Gemma4AudioConverter and shares the same
functionality.
from_preset methodEmbeddingGemma2AudioConverter.from_preset(preset, **kwargs)
Instantiate a keras_hub.layers.AudioConverter from a model preset.
A preset is a directory of configs, weights and other file assets used
to save and load a pre-trained model. The preset can be passed as
one of:
'whisper_base_en''kaggle://user/whisper/keras/whisper_base_en''hf://user/whisper_base_en''./whisper_base_en'You can run cls.presets.keys() to list all built-in presets available
on the class.
This constructor can be called in one of two ways. Either from the base
class like keras_hub.models.AudioConverter.from_preset(), or from a
model class like keras_hub.models.WhisperAudioConverter.from_preset().
If calling from the base class, the subclass of the returning object
will be inferred from the config in the preset directory.
Arguments
True, the weights will be loaded into the
model architecture. If False, the weights will be randomly
initialized.Examples
# Load an audio converter from a preset.
converter = keras_hub.layers.AudioConverter.from_preset(
"whisper_base_en"
)
# Convert some raw mono channel audio input.
converter(np.ones(2, 1_000))
| Preset | Parameters | Description |
|---|---|---|
| embedding_gemma2 | 744.37M | EmbeddingGemma 2: 744M-parameter, 24-layer multimodal embedding model built on Gemma 4. Embeds text, images, video and audio into a 768-dimensional space. |