Skip to content

Conversation

@basnijholt
Copy link
Owner

No description provided.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: ASR Interface Refactor Causes Parameter Mismatch

The ASR interface was refactored from a function to an ASRService object. In agent_cli/agents/chat.py and agent_cli/agents/transcribe.py, the transcriber.transcribe() method is called with parameters like p, stop_event, quiet, live, and logger. However, the ASRService.transcribe() method, as defined in its base class, only accepts audio_data: bytes, leading to a TypeError at runtime.

agent_cli/agents/chat.py#L178-L193

start_time = time.monotonic()
transcriber = get_asr_service(
provider_cfg,
wyoming_asr_cfg,
openai_asr_cfg,
openai_llm_cfg,
LOGGER,
quiet=general_cfg.quiet,
)
instruction = await transcriber.transcribe(
p=p,
stop_event=stop_event,
quiet=general_cfg.quiet,
live=live,
logger=LOGGER,
)

agent_cli/agents/transcribe.py#L84-L99

with signal_handling_context(LOGGER, general_cfg.quiet) as stop_event:
transcriber = get_asr_service(
provider_cfg,
wyoming_asr_cfg,
openai_asr_cfg,
openai_llm_cfg,
LOGGER,
quiet=general_cfg.quiet,
)
transcript = await transcriber.transcribe(
logger=LOGGER,
p=p,
stop_event=stop_event,
quiet=general_cfg.quiet,
live=live,
)

Fix in CursorFix in Web


Bug: Function Call Error: Mismatched Parameters

Interface mismatch: The synthesizer function returned by get_synthesizer() now only accepts a text parameter. However, it is still being called with additional keyword arguments such as wyoming_tts_config, openai_tts_config, openai_llm_config, logger, quiet, and live, which will cause a TypeError at runtime.

agent_cli/tts.py#L287-L297

agent-cli/agent_cli/tts.py

Lines 287 to 297 in 3d0c3b9

async with live_timer(live, "🔊 Synthesizing text", style="blue", quiet=quiet):
audio_data = await synthesizer(
text=text,
wyoming_tts_config=wyoming_tts_config,
openai_tts_config=openai_tts_config,
openai_llm_config=openai_llm_config,
logger=logger,
quiet=quiet,
live=live,
)
except Exception:

Fix in CursorFix in Web


Bug: ASR Service Fails Without Audio Input Configuration

The audio_in_cfg parameter, which configured the audio input device (e.g., input_device_index via setup_devices) for the ASR service, was removed from the _handle_conversation_turn and _async_main functions. This prevents the ASR service from correctly selecting the audio input device, causing transcription failures.

agent_cli/agents/transcribe.py#L69-L79

async def _async_main(
*,
provider_cfg: config.ProviderSelection,
general_cfg: config.General,
wyoming_asr_cfg: config.WyomingASR,
openai_asr_cfg: config.OpenAIASR,
ollama_cfg: config.Ollama,
openai_llm_cfg: config.OpenAILLM,
llm_enabled: bool,
p: pyaudio.PyAudio,

agent_cli/agents/chat.py#L145-L162

async def _handle_conversation_turn(
*,
p: pyaudio.PyAudio,
stop_event: InteractiveStopEvent,
conversation_history: list[ConversationEntry],
provider_cfg: config.ProviderSelection,
general_cfg: config.General,
history_cfg: config.History,
wyoming_asr_cfg: config.WyomingASR,
openai_asr_cfg: config.OpenAIASR,
ollama_cfg: config.Ollama,
openai_llm_cfg: config.OpenAILLM,
audio_out_cfg: config.AudioOutput,
wyoming_tts_cfg: config.WyomingTTS,
openai_tts_cfg: config.OpenAITTS,
live: Live,
) -> None:

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants