mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-26 23:50:17 +00:00
Adds speech-to-text support so WASM channels can emit audio attachments that get automatically transcribed before reaching the agent. Telegram voice notes are the first integration — downloaded via Bot API and transcribed via OpenAI Whisper. - Extend WIT with attachment-kind, attachment records on emitted-message - Add Attachment/AttachmentKind types to channel.rs and IncomingMessage - Add TranscriptionProvider trait, AudioFormat enum, TranscriptionMiddleware - Implement OpenAI Whisper provider (multipart POST, 25MB limit) - Add TranscriptionConfig + TranscriptionSettings with env var overrides - Parse Telegram voice messages, download via getFile, emit as attachments - Apply transcription in both process/dispatch emitted message paths - Graceful degradation: download failures show "[Voice note: download failed]" - Validate attachment sizes (10MB max), drop oversized without losing message Co-Authored-By: Claude Opus 4.6 <[email protected]>
28 lines
529 B
TOML
28 lines
529 B
TOML
[package]
|
|
name = "telegram-channel"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Telegram Bot API channel for IronClaw"
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib"]
|
|
|
|
[dependencies]
|
|
# WIT bindgen for WASM component model
|
|
wit-bindgen = "0.36"
|
|
|
|
# Serialization
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
|
|
# Exclude from parent workspace (this is a standalone WASM component)
|
|
[workspace]
|
|
|
|
[profile.release]
|
|
# Optimize for size
|
|
opt-level = "s"
|
|
lto = true
|
|
strip = true
|
|
codegen-units = 1
|