MLX
meralion2
meralion
meralion-2
apple-silicon
custom_code
Sirui He commited on
Commit
e2f1dfa
·
verified ·
1 Parent(s): fa461f7

docs: add batch_transcribe example to MLX section

Browse files
Files changed (1) hide show
  1. README.md +14 -0
README.md CHANGED
@@ -607,6 +607,20 @@ text = transcribe(model, "audio.wav", task="sqa", question="What is the speaker
607
  text = transcribe(model, "audio.wav", task="summarize")
608
  ```
609
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
610
  #### CLI
611
 
612
  ```bash
 
607
  text = transcribe(model, "audio.wav", task="summarize")
608
  ```
609
 
610
+ #### Batch Inference
611
+
612
+ Process multiple audio files in parallel for higher throughput:
613
+
614
+ ```python
615
+ from mlx_meralion import load_model, batch_transcribe
616
+
617
+ model = load_model("MERaLiON/MERaLiON-2-10B-MLX")
618
+
619
+ results = batch_transcribe(model, ["audio1.wav", "audio2.wav", "audio3.wav"])
620
+ for text in results:
621
+ print(text)
622
+ ```
623
+
624
  #### CLI
625
 
626
  ```bash