mirror of
https://github.com/openai/codex.git
synced 2026-04-30 17:36:40 +00:00
Add realtime voice selection (#17176)
- Add realtime voice selection for realtime/start. - Expose the supported v1/v2 voice lists and cover explicit, configured, default, and invalid voice paths.
This commit is contained in:
@@ -144,6 +144,8 @@ use codex_app_server_protocol::ThreadRealtimeAppendAudioParams;
|
||||
use codex_app_server_protocol::ThreadRealtimeAppendAudioResponse;
|
||||
use codex_app_server_protocol::ThreadRealtimeAppendTextParams;
|
||||
use codex_app_server_protocol::ThreadRealtimeAppendTextResponse;
|
||||
use codex_app_server_protocol::ThreadRealtimeListVoicesParams;
|
||||
use codex_app_server_protocol::ThreadRealtimeListVoicesResponse;
|
||||
use codex_app_server_protocol::ThreadRealtimeStartParams;
|
||||
use codex_app_server_protocol::ThreadRealtimeStartResponse;
|
||||
use codex_app_server_protocol::ThreadRealtimeStartTransport;
|
||||
@@ -279,6 +281,7 @@ use codex_protocol::protocol::McpAuthStatus as CoreMcpAuthStatus;
|
||||
use codex_protocol::protocol::McpServerRefreshConfig;
|
||||
use codex_protocol::protocol::Op;
|
||||
use codex_protocol::protocol::RateLimitSnapshot as CoreRateLimitSnapshot;
|
||||
use codex_protocol::protocol::RealtimeVoicesList;
|
||||
use codex_protocol::protocol::ReviewDelivery as CoreReviewDelivery;
|
||||
use codex_protocol::protocol::ReviewRequest;
|
||||
use codex_protocol::protocol::ReviewTarget as CoreReviewTarget;
|
||||
@@ -839,6 +842,10 @@ impl CodexMessageProcessor {
|
||||
self.thread_realtime_stop(to_connection_request_id(request_id), params)
|
||||
.await;
|
||||
}
|
||||
ClientRequest::ThreadRealtimeListVoices { request_id, params } => {
|
||||
self.thread_realtime_list_voices(to_connection_request_id(request_id), params)
|
||||
.await;
|
||||
}
|
||||
ClientRequest::ReviewStart { request_id, params } => {
|
||||
self.review_start(to_connection_request_id(request_id), params)
|
||||
.await;
|
||||
@@ -6861,6 +6868,7 @@ impl CodexMessageProcessor {
|
||||
ConversationStartTransport::Webrtc { sdp }
|
||||
}
|
||||
}),
|
||||
voice: params.voice,
|
||||
}),
|
||||
)
|
||||
.await;
|
||||
@@ -6987,6 +6995,21 @@ impl CodexMessageProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
async fn thread_realtime_list_voices(
|
||||
&mut self,
|
||||
request_id: ConnectionRequestId,
|
||||
_params: ThreadRealtimeListVoicesParams,
|
||||
) {
|
||||
self.outgoing
|
||||
.send_response(
|
||||
request_id,
|
||||
ThreadRealtimeListVoicesResponse {
|
||||
voices: RealtimeVoicesList::builtin(),
|
||||
},
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
fn build_review_turn(turn_id: String, display_text: &str) -> Turn {
|
||||
let items = if display_text.is_empty() {
|
||||
Vec::new()
|
||||
|
||||
Reference in New Issue
Block a user