Mistral Voxtral 로컬 실행 가이드: 오픈웨이트 TTS를 내 GPU에서 돌리기
Voxtral 모델 변형별 VRAM 요구사항, Transformers·Ollama·llama.cpp 설치 방법과 양자화·배치·스트리밍 최적화 팁을 정리한다
2026-08-12 · 최초 발행 2026-03-29
Voxtral이 주목받는 이유
r/LocalLLaMA에서 320개 이상의 댓글을 끌어모은 Mistral Voxtral은 오픈웨이트 텍스트-음성 변환(TTS) 모델이다. ElevenLabs나 OpenAI TTS 같은 클라우드 서비스에 의존하지 않고 자신의 하드웨어에서 고품질 음성을 만들 수 있다는 점이 프라이버시를 중시하는 개발자와 비용을 최적화하려는 팀 모두에게 매력적으로 다가온다.
Voxtral은 Mistral AI의 첫 오디오 모달리티 모델로, 텍스트를 자연스러운 음성으로 바꾸는 TTS와 음성을 텍스트로 바꾸는 STT(Speech-to-Text)를 모두 포함한다. 다국어 지원이 강점인데, 한국어를 포함한 30개 언어에서 자연스러운 억양과 음조를 만들어낸다.
모델은 세 가지 크기로 나온다.
| 모델 | 파라미터 | VRAM 요구 | 품질 등급 |
|---|---|---|---|
| Voxtral-Mini | 1.5B | 4GB | 보통 |
| Voxtral-7B | 7B | 16GB | 높음 |
| Voxtral-22B | 22B | 48GB | 최고 |
어떤 하드웨어가 필요한가
최소 사양(Voxtral-Mini)은 RTX 3060 12GB 이상 또는 Apple M1/M2(16GB 통합 메모리), RAM 16GB, 저장공간 10GB다. 권장 사양(Voxtral-7B)은 RTX 4080 16GB, RTX 3090 24GB, A10G 24GB 급 GPU에 RAM 32GB, 저장공간 20GB가 필요하다. 고성능 사양(Voxtral-22B)은 A100 80GB, H100 80GB, 또는 RTX 4090 두 장을 NVLink로 묶은 구성에 RAM 64GB, 저장공간 50GB가 요구된다.
설치 경로
Hugging Face Transformers로 직접 다루기. 가장 세밀한 제어가 가능한 방법이다.
# 가상환경 생성
python -m venv voxtral-env
source voxtral-env/bin/activate
# 의존성 설치
pip install transformers>=4.50.0 torch torchaudio accelerate
# 오디오 처리 라이브러리
pip install soundfile librosa
# 선택적: 더 빠른 오디오 처리
pip install flash-attn --no-build-isolation
from transformers import VoxtralForSpeechSynthesis, VoxtralProcessor
import soundfile as sf
import torch
# 모델 로드 (자동으로 GPU 할당)
processor = VoxtralProcessor.from_pretrained("mistralai/Voxtral-7B")
model = VoxtralForSpeechSynthesis.from_pretrained(
"mistralai/Voxtral-7B",
torch_dtype=torch.float16,
device_map="auto"
)
# 음성 생성
text = "안녕하세요. Mistral Voxtral로 생성된 한국어 음성입니다."
inputs = processor(text=text, return_tensors="pt").to("cuda")
with torch.no_grad():
speech = model.generate(**inputs, speaker_id=0)
# 파일 저장
audio_array = speech.cpu().numpy()
sf.write("output.wav", audio_array, samplerate=24000)
Ollama로 가장 간단하게.
# Ollama 설치 (macOS/Linux)
curl -fsSL https://ollama.ai/install.sh | sh
# Voxtral 모델 다운로드
ollama pull voxtral:7b
# 실행
ollama run voxtral:7b
메모리가 제한된 환경이라면 llama.cpp(GGUF).
# llama.cpp 빌드 (CUDA 지원)
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make LLAMA_CUDA=1 -j4
# GGUF 모델 다운로드 (Q4_K_M 양자화 - 권장)
wget https://huggingface.co/mistralai/Voxtral-7B-GGUF/resolve/main/voxtral-7b-q4_k_m.gguf
# 실행
./llama-tts -m voxtral-7b-q4_k_m.gguf \
--text "한국어 TTS 테스트입니다" \
--output output.wav \
--speaker-id 0
메모리와 처리량 조절하기
4비트 양자화를 쓰면 16GB 요구를 6GB까지 줄일 수 있다.
from transformers import BitsAndBytesConfig
# 4비트 양자화로 16GB → 6GB 메모리 절약
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_quant_type="nf4"
)
model = VoxtralForSpeechSynthesis.from_pretrained(
"mistralai/Voxtral-7B",
quantization_config=quantization_config,
device_map="auto"
)
여러 텍스트를 한 번에 처리하는 배치 처리는 GPU 활용률을 높여준다.
texts = [
"첫 번째 문장입니다.",
"두 번째 문장입니다.",
"세 번째 문장입니다."
]
# 배치 인코딩
inputs = processor(
text=texts,
padding=True,
return_tensors="pt"
).to("cuda")
with torch.no_grad():
speeches = model.generate(**inputs, batch_size=3)
긴 텍스트라면 첫 오디오 청크를 빠르게 내보내는 스트리밍 모드를 쓸 수 있다.
import pyaudio
import numpy as np
stream = model.generate_stream(
**inputs,
chunk_size=2048 # 청크당 샘플 수
)
p = pyaudio.PyAudio()
audio_stream = p.open(format=pyaudio.paFloat32, channels=1, rate=24000, output=True)
for chunk in stream:
audio_stream.write(chunk.numpy().tobytes())
Apple Silicon에서 돌리기
M1/M2/M3 Mac에서는 Metal Performance Shaders(MPS) 백엔드를 쓴다.
device = "mps" if torch.backends.mps.is_available() else "cpu"
model = VoxtralForSpeechSynthesis.from_pretrained(
"mistralai/Voxtral-Mini", # Apple Silicon은 Mini 권장
torch_dtype=torch.float16
).to(device)
M2 Pro(16GB)에서는 Voxtral-Mini 기준 실시간 대비 약 1.2배 속도로 음성을 생성할 수 있다.
RTX 4080 이상의 GPU를 갖췄다면 Voxtral-7B는 클라우드 TTS 서비스에 근접한 품질을 내면서 반복 사용 비용이 0에 수렴한다는 것이 이 모델의 실질적인 강점이다. 한국어 지원 품질도 상당한 수준이어서, 프라이버시가 중요한 TTS 애플리케이션을 구축하려는 국내 개발자에게 유력한 기반이 될 수 있다.