Ir para o conteúdo
ModelListadosExterno
Baixar

Sam Audio Large

This model was converted to MLX format from facebook/sam-audio-large using mlx-audio version 0.2.10. Refer to the original model card for more details on the model.

TipoOtherModelo basefacebook/sam-audio-largeVersãoRevision a3e5294

Fonte do modelo

Tipo
Other
Tamanho do arquivo
1,39–5,00 GB
Modelo base
facebook/sam-audio-large
Versão
vRevision a3e5294
Atualizado
15 de out. de 2026
Downloads
83
Fonte
Hugging Face

Descrição da fonte

mlx-community/sam-audio-large

This model was converted to MLX format from facebook/sam-audio-large using mlx-audio version 0.2.10. Refer to the original model card for more details on the model.

Use with mlx

pip install -U mlx-audio

Voice Isolation:

from mlx_audio.sts import SAMAudio, SAMAudioProcessor, save_audio
import mlx.core as mx

# Load model and processor
processor = SAMAudioProcessor.from_pretrained("facebook/sam-audio-large")
model = SAMAudio.from_pretrained("facebook/sam-audio-large")

# Process inputs
batch = processor(
    descriptions=["speech"],
    audios=["path/to/audio.mp3"],
    # anchors=[[("+", 0.2, 0.5)]],  # Optional: temporal
)

# Separate audio
result = model.separate(
    audios=batch.audios,
    descriptions=batch.descriptions,
    sizes=batch.sizes,
    anchor_ids=batch.anchor_ids,
    anchor_alignment=batch.anchor_alignment,
    ode_decode_chunk_size=50,  # Chunked decoding for memory efficiency
)

# For long audio files, use separate_long().
# Note: This is slower than separate() but it is more memory efficient.
# result = model.separate_long(
#     audios=batch.audios,
#     descriptions=batch.descriptions,
#     chunk_seconds=10.0,
#     overlap_seconds=3.0,
#     anchor_ids=batch.anchor_ids,
#     anchor_alignment=batch.anchor_alignment,
#     ode_decode_chunk_size=50,  # Chunked decoding for memory efficiency
# )

# Save output
## Isolated speech
save_audio(result.target[0], "separated.wav", sample_rate=model.sample_rate)

## Residual audio (background music/noise/other sounds)
save_audio(result.residual[0], "residual.wav", sample_rate=model.sample_rate)

# Check memory usage
print(f"Peak memory: {result.peak_memory:.2f} GB")

Fontes

1 fonte
Hugging FacePrimárioVersão a3e529408663b65cb418584036db8f7209a80ced
huggingface.co/mlx-community/sam-audio-large/tree/a3e529408663b65cb418584036db8f7209a80ced

Verificado 29 de ago.

Artefatos de modelo

3 artefatos

model-00001-of-00003.safetensors

safetensors · 4,94 GB · SHA-256 8284b4aae4d7…b85e · Hugging Face

Baixar

model-00002-of-00003.safetensors

safetensors · 5,00 GB · SHA-256 5b7df8eca313…0e3f · Hugging Face

Baixar

model-00003-of-00003.safetensors

safetensors · 1,39 GB · SHA-256 302137b863ea…d50a · Hugging Face

Baixar

Trechos de fonte

2 trechos

--- license: other language: - en base_model: - facebook/sam-audio-large pipeline_tag: audio-to-audio library_name: mlx-audio tags: - audio-to-audio - speech - speech generation - voice isolation - mlx --- # mlx-community/sam-audio-large This model was converted to MLX format from [`facebook/sam-audio-large`](https://huggingface.co/facebook/sam-audio-large) using mlx-audio version **0.2.10**. Refer to the [original model card](https://huggingface.co/facebook/sam-audio-large) for more details on the model. ## Use with mlx ```bash pip install -U mlx-audio ``` ## Voice Isolation: ```python from mlx_audio.sts import SAMAudio, SAMAudioProcessor, save_audio import mlx.core as mx # Load model and processor processor = SAMAudioProcessor.from_pretrained("facebook/sam-audio-large") model = SAMAudio.from_pretrained("facebook/sam-audio-large") # Process inputs batch = processor( descriptions=["speech"], audios=["path/to/audio.mp3"], # anchors=[[("+", 0.2, 0.5)]], # Optional: temporal ) # Separate audio result = model.separate( audios=batch.audios, descriptions=batch.descriptions, sizes=batch.sizes, anchor_ids=batch.anchor_ids, anchor_alignment=batch.anchor_alignment, ode_decode_chunk_size=50, # Chunked decoding for memory efficiency ) # For long audio files, use separate_long(). # Note: This is slower than separate() but it is more memory efficient. # result = model.separate_long( # audios=batch.audios, # descriptions=batch.descriptions, # chunk_seconds=10.0, # overlap_seconds=3.0, # anchor_ids=batch.anchor_ids, # anchor_alignment=batch.anchor_alignment, # ode_decode_chunk_size=50, # Chunked decoding for memory efficiency # ) # Save output ## Isolated speech save_audio(result.target[0], "separated.wav", sample_rate=model.sample_rate) ## Residual audio (background music/noise/other sounds) save_audio(result.residual[0], "residual.wav", sample_rate=model.sample_rate) # Check memory usage print(f"Peak memory: {result.peak_memory:.2f} GB") ```

Source context: 83 downloads · 7 likes · Pipeline audio-to-audio · Library mlx-audio · Repo mlx-community/sam-audio-large