it0/it0_app
hailin 5460be8c04 feat: add TTS voice and style settings to Flutter app
Add user-configurable TTS voice and tone style settings that flow from
the Flutter app through the backend to the voice-agent at call time.

## Flutter App (it0_app)

### Domain Layer
- app_settings.dart: Add `ttsVoice` (default: 'coral') and `ttsStyle`
  (default: '') fields to AppSettings entity with copyWith support

### Data Layer
- settings_datasource.dart: Add SharedPreferences keys
  `settings_tts_voice` and `settings_tts_style` for local persistence
  in loadSettings(), saveSettings(), and clearSettings()

### Presentation Layer
- settings_providers.dart: Add `setTtsVoice()` and `setTtsStyle()`
  methods to SettingsNotifier for Riverpod state management
- settings_page.dart: Add "语音" settings group between Notifications
  and Security groups with:
  - Voice picker: 13 OpenAI voices with gender/style labels
    (e.g. "女 · 温暖", "男 · 沉稳", "中性") in a BottomSheet
  - Style picker: 5 presets (专业干练/温柔耐心/轻松活泼/严肃正式/科幻AI)
    as ChoiceChips + custom text input field + reset button

### Call Flow
- agent_call_page.dart: Send `tts_voice` and `tts_style` in the POST
  body when requesting a LiveKit token at call initiation

## Backend

### voice-service (Python/FastAPI)
- livekit_token.py: Accept optional `tts_voice` and `tts_style` via
  Pydantic TokenRequest body model; embed them in RoomAgentDispatch
  metadata JSON alongside auth_header (backward compatible)

### voice-agent (Python/LiveKit Agents)
- agent.py: Extract `tts_voice` and `tts_style` from ctx.job.metadata;
  use them when creating openai_plugin.TTS() — user-selected voice
  overrides config default, user-selected style overrides default
  instructions. Falls back to config defaults when not provided.

## Data Flow
Flutter Settings → SharedPreferences → POST /livekit/token body →
voice-service embeds in RoomAgentDispatch metadata →
voice-agent reads from ctx.job.metadata → TTS creation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 09:38:15 -08:00
..
android feat: add TTS voice and style settings to Flutter app 2026-03-01 09:38:15 -08:00
assets feat: replace default Flutter icon with iAgent robot logo 2026-02-23 01:41:36 -08:00
ios/Runner/Assets.xcassets/AppIcon.appiconset feat: replace default Flutter icon with iAgent robot logo 2026-02-23 01:41:36 -08:00
lib feat: add TTS voice and style settings to Flutter app 2026-03-01 09:38:15 -08:00
test fix: translate all remaining English UI strings to Chinese and remove dead code 2026-02-23 02:07:57 -08:00
.gitignore chore: gitignore iOS 自动生成文件 2026-02-23 05:10:54 -08:00
.metadata fix: 提交完整的Android项目配置文件,修复跨机器构建失败 2026-02-22 16:17:18 -08:00
README.md chore: 提交 Flutter 项目默认 README 2026-02-22 22:12:27 -08:00
analysis_options.yaml Initial commit: IT0 AI-powered server cluster operations platform 2026-02-08 22:54:37 -08:00
pubspec.lock feat: add TTS voice and style settings to Flutter app 2026-03-01 09:38:15 -08:00
pubspec.yaml feat: migrate voice call from WebSocket/PCM to LiveKit WebRTC 2026-02-28 08:55:33 -08:00

README.md

it0_app

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.