init: Kira — AI body double with Honcho memory

Full voice pipeline (Whisper STT -> DeepSeek LLM -> OpenAI TTS),
animated SVG avatar (Live2D-ready), girly-pop UI, lofi music,
timer/notes/pets/wardrobe widgets, 10 background scenes with
particle effects, Honcho cross-session memory.
This commit is contained in:
2026-06-04 10:51:38 -04:00
commit 97424cb98f
47 changed files with 5691 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
"""Speech-to-text via OpenAI Whisper API"""
import logging
from openai import AsyncOpenAI
from config import settings
logger = logging.getLogger("kira.stt")
def _get_client() -> AsyncOpenAI:
return AsyncOpenAI(api_key=settings.openai_api_key)
async def transcribe_audio(audio_bytes: bytes) -> str | None:
"""Transcribe audio bytes to text using Whisper API."""
try:
client = _get_client()
transcript = await client.audio.transcriptions.create(
model="whisper-1",
file=("audio.webm", audio_bytes, "audio/webm"),
language="en",
response_format="text",
)
return transcript.strip() if transcript and transcript.strip() else None
except Exception as e:
logger.error(f"STT error: {e}")
return None