mirror of
https://github.com/openai/codex.git
synced 2026-04-28 16:45:54 +00:00
[stack 4/4] Reduce realtime self-interruptions during playback (#14827)
## Stack Position 4/4. Top-of-stack sibling built on #14830. ## Base - #14830 ## Sibling - #14829 ## Scope - Gate low-level mic chunks while speaker playback is active, while still allowing spoken barge-in. --------- Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -140,6 +140,7 @@ mod voice {
|
||||
use std::sync::Mutex;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
use std::sync::atomic::AtomicU16;
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
|
||||
pub struct RecordedAudio {
|
||||
pub data: Vec<i16>,
|
||||
@@ -158,7 +159,11 @@ mod voice {
|
||||
Err("voice input is unavailable in this build".to_string())
|
||||
}
|
||||
|
||||
pub fn start_realtime(_config: &Config, _tx: AppEventSender) -> Result<Self, String> {
|
||||
pub fn start_realtime(
|
||||
_config: &Config,
|
||||
_tx: AppEventSender,
|
||||
_playback_queued_samples: Arc<AtomicUsize>,
|
||||
) -> Result<Self, String> {
|
||||
Err("voice input is unavailable in this build".to_string())
|
||||
}
|
||||
|
||||
@@ -198,7 +203,10 @@ mod voice {
|
||||
}
|
||||
|
||||
impl RealtimeAudioPlayer {
|
||||
pub(crate) fn start(_config: &Config) -> Result<Self, String> {
|
||||
pub(crate) fn start(
|
||||
_config: &Config,
|
||||
_queued_samples: Arc<AtomicUsize>,
|
||||
) -> Result<Self, String> {
|
||||
Err("voice output is unavailable in this build".to_string())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user