메뉴
HN
Hacker News 55일 전

애플 M3 프로에서 구동되는 온디바이스 실시간 멀티모달 AI

IMP
8/10
핵심 요약

해커뉴스에 공개된 'Parlor' 프로젝트는 서버 비용 없이 로컬 기기에서 완전히 무료로 실시간 음성 및 시각 대화가 가능한 온디바이스 AI 데모입니다. 구글의 소형 모델인 Gemma 4 E2B와 Kokoro TTS를 활용하여 애플 M3 Pro 환경에서 약 2.5~3초의 종단 간 지연 시간을 달성했습니다. 이는 외부 API나 고가의 서버 없이도 로컬 환경에서 원활한 언어 학습 및 다양한 멀티모달 인터랙션이 가능해졌다는 점에서 오픈소스 AI 생태계의 중요한 진전으로 평가됩니다.

번역된 본문

원문 제목: Show HN: M3 Pro와 Gemma E2B를 활용한 실시간 AI (오디오/비디오 입력, 음성 출력)

Parlor는 온디바이스에서 구동되는 실시간 멀티모달 AI입니다. 기기 내에서 완전히 실행되는 AI와 자연스러운 음성 및 시각 대화를 나눌 수 있습니다. Parlor는 음성과 시각 이해를 위해 Gemma 4 E2B를 사용하고, 텍스트 음성 변환(TTS)을 위해 Kokoro를 활용합니다. 사용자가 말을 걸거나 카메라를 보여주면, 모든 것이 로컬에서 처리되어 AI가 음성으로 응답합니다. (parlor_realtime_ai_with_audio_video_input_optimized.mp4)

연구용 프리뷰(Research preview)입니다. 아직 초기 실험 단계이므로 다소 거친 부분이나 버그가 있을 수 있습니다.

왜 이것을 만들었는가? 저는 사람들이 영어 말하기를 연습할 수 있도록 돕기 위해 홈 서버에서 완전히 무료인 음성 AI를 자체 호스팅하고 있습니다. 현재 월간 활성 사용자가 수백 명에 달하며, 이를 무료로 유지하면서도 지속 가능하게 운영할 방법을 고민해 왔습니다. 그 해답은 명확했습니다. 모든 것을 기기 내에서 실행하여 서버 비용을 없애는 것입니다.

6개월 전만 해도 실시간 음성 모델만 구동하는 데 RTX 5090이 필요했습니다. 그런데 구글이 방금 M3 Pro에서도 실시간으로 비전(시각) 처리까지 가능한 매우 유능한 소형 모델을 공개했습니다! 물론 이 모델로 복잡한 에이전트 코딩(Agentic coding)을 수행할 수는 없지만, 새로운 언어를 배우는 사람들에게는 판도를 바꾸는 혁신입니다. 몇 년 후면 사람들이 스마트폰에서 이를 로컬로 실행하며, 카메라로 사물을 가리키고 그에 대해 대화할 수 있게 될 것을 상상해 보십시오. 또한 이 모델은 다국어를 지원하여 원할 때 언제든 모국어로 대화를 이어갈 수도 있습니다. 이는 본질적으로 OpenAI가 몇 년 전에 시연했던 바로 그 모습입니다.

작동 방식 브라우저 (마이크 + 카메라) │ │ WebSocket (오디오 PCM + JPEG 프레임) ▼ FastAPI 서버 ├── Gemma 4 E2B via LiteRT-LM (GPU) → 음성 + 시각 이해 └── Kokoro TTS (Mac에서는 MLX, Linux에서는 ONNX) → 음성 응답 생성 │ │ WebSocket (스트리밍된 오디오 청크) ▼ 브라우저 (재생 + 텍스트 변환)

  • 브라우저 내 음성 활동 감지(Voice Activity Detection, Silero VAD 적용)
  • 핸즈프리 방식으로, 말하기 위해 버튼을 누를 필요가 없습니다.
  • 끼어들기(Barge-in) 지원: AI가 말하는 도중에 말을 걸어 중간에 끊을 수 있습니다.
  • 문장 수준의 TTS 스트리밍: 전체 응답이 생성되기 전에 오디오 재생이 시작됩니다.

시스템 요구 사항

  • Python 3.12+
  • Apple Silicon을 탑재한 macOS 또는 지원되는 GPU가 있는 Linux
  • 모델을 위한 약 3 GB의 여유 RAM

빠른 시작 git clone https://github.com/fikrikarim/parlor.git cd parlor

uv가 설치되어 있지 않다면 설치

curl -LsSf https://astral.sh/uv/install.sh | sh cd src uv sync uv run server.py http://localhost:8000 을 열고 카메라 및 마이크 접근 권한을 허용한 뒤 대화를 시작하세요. 모델은 첫 실행 시 자동으로 다운로드됩니다 (Gemma 4 E2B의 경우 약 2.6 GB, 추가로 TTS 모델 포함).

구성 설정

  • MODEL_PATH (기본값: HuggingFace에서 자동 다운로드): 로컬 gemma-4-E2B-it.litertlm 파일의 경로
  • PORT (기본값: 8000): 서버 포트

성능 (Apple M3 Pro 기준)

  • 음성 + 비전 이해 소요 시간: 약 1.8~2.2초
  • 응답 생성 소요 시간(약 25개 토큰): 약 0.3초
  • 텍스트 음성 변환 소요 시간(13문장): 약 0.30.7초
  • 총 종단 간(End-to-End) 소요 시간: 약 2.5~3.0초
  • 디코딩 속도: GPU(Apple M3 Pro) 환경에서 약 83 토큰/초

프로젝트 구조 src/ ├── server.py # FastAPI WebSocket 서버 + Gemma 4 추론 ├── tts.py # 플랫폼 인식 TTS (Mac에서는 MLX, Linux에서는 ONNX) ├── index.html # 프론트엔드 UI (VAD, 카메라, 오디오 재생) ├── pyproject.toml # 종속성 └── benchmarks/ ├── bench.py # 종단 간 WebSocket 벤치마크 └── benchmark_tts.py # TTS 백엔드 비교

감사의 말 (Acknowledgments)

  • Gemma 4 by Google DeepMind
  • LiteRT-LM by Google AI Edge
  • Kokoro TTS by Hexgrad
  • 브라우저 음성 활동 감지를 위한 Silero VAD

라이선스: Apache 2.0

원문 보기
원문 보기 (영어)
Parlor On-device, real-time multimodal AI. Have natural voice and vision conversations with an AI that runs entirely on your machine. Parlor uses Gemma 4 E2B for understanding speech and vision, and Kokoro for text-to-speech. You talk, show your camera, and it talks back, all locally. parlor_realtime_ai_with_audio_video_input_optimized.mp4 Research preview. This is an early experiment. Expect rough edges and bugs. Why? I'm self-hosting a totally free voice AI on my home server to help people learn speaking English. It has hundreds of monthly active users, and I've been thinking about how to keep it free while making it sustainable. The obvious answer: run everything on-device, eliminating any server cost. Six months ago I needed an RTX 5090 to run just the voice models in real-time. Google just released a super capable small model that I can run on my M3 Pro in real-time, with vision too! Sure you can't do agentic coding with this, but it is a game-changer for people learning a new language. Imagine a few years from now that people can run this locally on their phones. They can point their camera at objects and talk about them. And this model is multi-lingual, so people can always fallback to their native language if they want. This is essentially what OpenAI demoed a few years ago. How it works Browser (mic + camera) │ │ WebSocket (audio PCM + JPEG frames) ▼ FastAPI server ├── Gemma 4 E2B via LiteRT-LM (GPU) → understands speech + vision └── Kokoro TTS (MLX on Mac, ONNX on Linux) → speaks back │ │ WebSocket (streamed audio chunks) ▼ Browser (playback + transcript) Voice Activity Detection in the browser ( Silero VAD ). Hands-free, no push-to-talk. Barge-in. Interrupt the AI mid-sentence by speaking. Sentence-level TTS streaming. Audio starts playing before the full response is generated. Requirements Python 3.12+ macOS with Apple Silicon, or Linux with a supported GPU ~3 GB free RAM for the model Quick start git clone https://github.com/fikrikarim/parlor.git cd parlor # Install uv if you don't have it curl -LsSf https://astral.sh/uv/install.sh | sh cd src uv sync uv run server.py Open http://localhost:8000 , grant camera and microphone access, and start talking. Models are downloaded automatically on first run (~2.6 GB for Gemma 4 E2B, plus TTS models). Configuration Variable Default Description MODEL_PATH auto-download from HuggingFace Path to a local gemma-4-E2B-it.litertlm file PORT 8000 Server port Performance (Apple M3 Pro) Stage Time Speech + vision understanding ~1.8-2.2s Response generation (~25 tokens) ~0.3s Text-to-speech (1-3 sentences) ~0.3-0.7s Total end-to-end ~2.5-3.0s Decode speed: ~83 tokens/sec on GPU (Apple M3 Pro). Project structure src/ ├── server.py # FastAPI WebSocket server + Gemma 4 inference ├── tts.py # Platform-aware TTS (MLX on Mac, ONNX on Linux) ├── index.html # Frontend UI (VAD, camera, audio playback) ├── pyproject.toml # Dependencies └── benchmarks/ ├── bench.py # End-to-end WebSocket benchmark └── benchmark_tts.py # TTS backend comparison Acknowledgments Gemma 4 by Google DeepMind LiteRT-LM by Google AI Edge Kokoro TTS by Hexgrad Silero VAD for browser voice activity detection License Apache 2.0