oddadmix / MasriSwitch-Gemma3n-Transcriber-v1

huggingface.co
Total runs: 62
24-hour runs: 0
7-day runs: -121
30-day runs: -121
Model's Last Updated: April 18 2026
automatic-speech-recognition

Introduction of MasriSwitch-Gemma3n-Transcriber-v1

Model Details of MasriSwitch-Gemma3n-Transcriber-v1

🇪🇬🎙 MasriSwitch-Gemma3n-Transcriber-v1

MasriSwitch-Gemma3n-Transcriber is an automatic speech transcription model specialized for Egyptian Arabic with strong English code-switching capabilities.

This model is one of the very few publicly available systems explicitly optimized for:

  • Egyptian Arabic dialect transcription
  • Natural Arabic ↔ English code-switching
  • Short and medium-length real-world audio

The model is trained using:

  • MohamedRashad/arabic-english-code-switching dataset
  • A private Egyptian speech dataset containing real conversational audio, voice notes, and mixed Arabic/English speech recordings

🔍 Overview

MasriSwitch-Gemma3n-Transcriber is built on the Gemma3n conditional generation architecture and fine-tuned to understand natural Egyptian speech patterns, including mixed Arabic/English utterances commonly used in daily life, workplaces, and online content.

It is suitable for:

  • Social media content transcription
  • Customer support calls
  • Meetings, voice notes, and interviews
  • Research in dialectal ASR
  • Multilingual speech processing

✨ Features
  • 🗣 Egyptian Arabic dialect-aware transcription
  • 🔀 Accurate English code-switching support
  • 🎧 Strong performance on informal, real-world speech
  • ⚡ Optimized for short (10–30s) audio segments
  • 🤖 Built using the Gemma3n generation-based ASR pipeline

🎯 Intended Use

Use this model for:

  • Speech-to-text systems
  • Captioning and subtitling
  • Chat or voice assistant pipelines
  • Indexing/searching Arabic audio content
  • Research and experimentation

⚠️ Limitations
  • Best results with clean audio and single speakers
  • Not optimized for Gulf, Levantine, or MSA-only speech
  • Struggles with:
    • Heavy noise
    • Overlapping speakers
    • Fast speech
  • Long recordings should be segmented (20–30s recommended)

🛡 Safety & Privacy
  • Transcriptions may include sensitive user data — handle with care.
  • Should not be used for high-stakes decisions without human review.
  • Biases in training data may affect accuracy.

🧪 Inference Example (Python)

import torch
from transformers import AutoProcessor, Gemma3nForConditionalGeneration

MODEL_ID = "oddadmix/egyptian-code-switching-b4-g2-merged"

def load_model_and_processor(model_id=MODEL_ID, device=None):
    if device is None:
        device = "cuda" if torch.cuda.is_available() else "cpu"

    print(f"Loading model {model_id} to device {device}...")
    
    model = Gemma3nForConditionalGeneration.from_pretrained(
        model_id,
        torch_dtype=torch.bfloat16 if device == "cuda" else None,
        device_map="auto" if device == "cuda" else None,
    ).eval()

    if not any(p.device.type == "cuda" for p in model.parameters()) and device == "cuda":
        model.to("cuda")

    processor = AutoProcessor.from_pretrained(model_id)
    return model, processor, device


def transcribe_file(model, processor, audio_path, max_new_tokens=128):
    if not audio_path:
        raise ValueError("audio_path must point to an audio file")

    messages = [
        {
            "role": "system",
            "content": [
                {"type": "text", "text": "You are an assistant that transcribes speech accurately."}
            ],
        },
        {
            "role": "user",
            "content": [
                {"type": "audio", "url": audio_path},
                {"type": "text", "text": "Please transcribe this audio."}
            ],
        },
    ]

    inputs = processor.apply_chat_template(
        messages,
        add_generation_prompt=True,
        tokenize=True,
        return_dict=True,
        return_tensors="pt",
    )

    device = next(model.parameters()).device
    inputs = {k: v.to(device) for k, v in inputs.items()}
    input_len = inputs["input_ids"].shape[-1]

    with torch.inference_mode():
        generated = model.generate(
            **inputs,
            max_new_tokens=max_new_tokens,
            do_sample=False,
        )

    gen_tokens = generated[0][input_len:]
    text = processor.decode(gen_tokens, skip_special_tokens=True)
    return text


if __name__ == "__main__":
    audio_path = "path/to/audio.wav"
    model, processor, device = load_model_and_processor()
    transcription = transcribe_file(model, processor, audio_path, max_new_tokens=256)
    print("Transcription:", transcription)

Runs of oddadmix MasriSwitch-Gemma3n-Transcriber-v1 on huggingface.co

62
Total runs
0
24-hour runs
1
3-day runs
-121
7-day runs
-121
30-day runs

More Information About MasriSwitch-Gemma3n-Transcriber-v1 huggingface.co Model

More MasriSwitch-Gemma3n-Transcriber-v1 license Visit here:

https://choosealicense.com/licenses/apache-2.0

MasriSwitch-Gemma3n-Transcriber-v1 huggingface.co

MasriSwitch-Gemma3n-Transcriber-v1 huggingface.co is an AI model on huggingface.co that provides MasriSwitch-Gemma3n-Transcriber-v1's model effect (), which can be used instantly with this oddadmix MasriSwitch-Gemma3n-Transcriber-v1 model. huggingface.co supports a free trial of the MasriSwitch-Gemma3n-Transcriber-v1 model, and also provides paid use of the MasriSwitch-Gemma3n-Transcriber-v1. Support call MasriSwitch-Gemma3n-Transcriber-v1 model through api, including Node.js, Python, http.

MasriSwitch-Gemma3n-Transcriber-v1 huggingface.co Url

https://huggingface.co/oddadmix/MasriSwitch-Gemma3n-Transcriber-v1

oddadmix MasriSwitch-Gemma3n-Transcriber-v1 online free

MasriSwitch-Gemma3n-Transcriber-v1 huggingface.co is an online trial and call api platform, which integrates MasriSwitch-Gemma3n-Transcriber-v1's modeling effects, including api services, and provides a free online trial of MasriSwitch-Gemma3n-Transcriber-v1, you can try MasriSwitch-Gemma3n-Transcriber-v1 online for free by clicking the link below.

oddadmix MasriSwitch-Gemma3n-Transcriber-v1 online free url in huggingface.co:

https://huggingface.co/oddadmix/MasriSwitch-Gemma3n-Transcriber-v1

MasriSwitch-Gemma3n-Transcriber-v1 install

MasriSwitch-Gemma3n-Transcriber-v1 is an open source model from GitHub that offers a free installation service, and any user can find MasriSwitch-Gemma3n-Transcriber-v1 on GitHub to install. At the same time, huggingface.co provides the effect of MasriSwitch-Gemma3n-Transcriber-v1 install, users can directly use MasriSwitch-Gemma3n-Transcriber-v1 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

MasriSwitch-Gemma3n-Transcriber-v1 install url in huggingface.co:

https://huggingface.co/oddadmix/MasriSwitch-Gemma3n-Transcriber-v1

Url of MasriSwitch-Gemma3n-Transcriber-v1

MasriSwitch-Gemma3n-Transcriber-v1 huggingface.co Url

Provider of MasriSwitch-Gemma3n-Transcriber-v1 huggingface.co

oddadmix
ORGANIZATIONS

Other API from oddadmix

huggingface.co

Total runs: 17
Run Growth: 3
Growth Rate: 16.67%
Updated:July 18 2026
huggingface.co

Total runs: 17
Run Growth: 3
Growth Rate: 15.79%
Updated:July 18 2026