claude-code - 💡(How to fix) Fix Bug: VS Code extension hardcodes dictation language to "en", ignores settings.json [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52776Fetched 2026-04-25 06:21:16
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4closed ×1commented ×1

Root Cause

In extension.js (v2.1.119), the function that builds the Deepgram WebSocket URL contains:

```js let N = new URLSearchParams({ encoding: "linear16", sample_rate: "16000", channels: "1", endpointing_ms: "300", utterance_end_ms: "1000", language: "en", // hardcoded use_conversation_engine: "true", stt_provider: "deepgram-nova3" }); ```

The function receives `(K, V, B)` where `K` is the auth token and `B` is a list of keyterms, but the user's configured `language` is never read.

Fix Action

Workaround

Manually patching `extension.js` to replace `language:"en"` with `language:"fr"` fixes dictation. This needs to be redone after each extension update.

RAW_BUFFERClick to expand / collapse

Problem

The Claude Code VS Code extension sends language: "en" hardcoded in its transcription WebSocket request to Deepgram, regardless of the language setting in ~/.claude/settings.json. This makes voice dictation unusable for non-English speakers when using the VS Code integration.

The CLI respects the language setting correctly; only the VS Code extension is affected.

Reproduction

  1. Set "language": "fr" (or any non-English code/name) in ~/.claude/settings.json
  2. Fully quit and relaunch VS Code
  3. Open the Claude Code panel, click the microphone button (or press Ctrl+D)
  4. Speak in French

Expected: French transcription. Actual: Attempted English phonetic transcription of the French audio, often resulting in garbled text or no output at all.

Root cause

In extension.js (v2.1.119), the function that builds the Deepgram WebSocket URL contains:

```js let N = new URLSearchParams({ encoding: "linear16", sample_rate: "16000", channels: "1", endpointing_ms: "300", utterance_end_ms: "1000", language: "en", // hardcoded use_conversation_engine: "true", stt_provider: "deepgram-nova3" }); ```

The function receives `(K, V, B)` where `K` is the auth token and `B` is a list of keyterms, but the user's configured `language` is never read.

Workaround

Manually patching `extension.js` to replace `language:"en"` with `language:"fr"` fixes dictation. This needs to be redone after each extension update.

Environment

  • OS: Debian (Linux 6.12)
  • VS Code extension: `anthropic.claude-code` v2.1.119
  • `~/.claude/settings.json` contains `"language": "fr"`
  • CLI voice dictation (`/voice` in a terminal) works correctly with the same settings file

Related

  • #36224 (closed) — similar issue for Remote Control sessions; this issue is specifically about the VS Code extension.

extent analysis

TL;DR

The fix involves modifying the extension.js file to read the user's configured language from ~/.claude/settings.json instead of hardcoding "en".

Guidance

  • Identify the line in extension.js where the language parameter is hardcoded to "en" and replace it with code that reads the language setting from ~/.claude/settings.json.
  • Verify that the language setting in ~/.claude/settings.json is correctly set to the desired language code (e.g., "fr" for French).
  • After modifying extension.js, relaunch VS Code and test the voice dictation feature to ensure it now uses the correct language.
  • Consider filing a feature request or pull request with the extension maintainer to incorporate this fix into the official codebase.

Example

const language = require('fs').readFileSync('~/.claude/settings.json', 'utf8');
const languageSetting = JSON.parse(language).language;
// ...
let N = new URLSearchParams({
  // ...
  language: languageSetting,
  // ...
});

Notes

This fix assumes that the ~/.claude/settings.json file is correctly formatted and contains the language setting. Additionally, this modification will need to be reapplied after each extension update.

Recommendation

Apply the workaround by modifying the extension.js file to read the user's configured language, as this is the most direct way to resolve the issue until an official fix is released.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING