feat: complete voice session safety and confirmation flow
This commit is contained in:
@@ -568,6 +568,22 @@ async def create_voice_turn_from_text(...)
|
||||
async def get_voice_turn(...)
|
||||
```
|
||||
|
||||
### 解决低置信度确认
|
||||
|
||||
```python
|
||||
@router.post(
|
||||
"/voice-sessions/{session_id}/turns/{turn_id}/confirm",
|
||||
response_model=VoiceTurnSummaryResponse,
|
||||
)
|
||||
async def resolve_voice_turn_confirmation(...)
|
||||
```
|
||||
|
||||
支持:
|
||||
|
||||
- `accept`: 按当前理解继续本轮
|
||||
- `retry_recording`: 撤回当前理解,重新录音
|
||||
- `switch_to_text`: 撤回当前理解,切换到文本输入
|
||||
|
||||
### 结束并保存
|
||||
|
||||
```python
|
||||
@@ -578,6 +594,13 @@ async def get_voice_turn(...)
|
||||
async def finalize_voice_session(...)
|
||||
```
|
||||
|
||||
### 获取语音共创 analytics
|
||||
|
||||
```python
|
||||
@router.get("/voice-sessions/analytics", response_model=VoiceSessionAnalyticsResponse)
|
||||
async def get_voice_session_analytics(...)
|
||||
```
|
||||
|
||||
### 放弃会话
|
||||
|
||||
```python
|
||||
|
||||
Reference in New Issue
Block a user