# Obsidian Speak Selection Right-click selected text to read it aloud via the Web Speech API. Auto-detects language — no configuration needed. ## Features - **Right-click → "朗读选中文字/Speak Selection"** on any text selection - **Command palette**: trigger via the "朗读选中文字/Speak Selection" command or assign a hotkey - **Auto language detection**: Chinese, Japanese, Korean, German, Russian, Arabic, Hindi, Thai, and more — detected by character set. German/English disambiguation via scoring (function words, prefixes, suffixes, noun capitalization) - **23 supported languages** as default/fallback (see below) - **Settings tab**: toggle auto-detect, pick a default language, adjust speech rate - **Offline**: uses built-in system voices, no API key or internet required - **Configurable speech rate**: slider from 0.5x (half speed) to 2.0x (double speed), default 0.9x ## Installation ### Community Plugin Store Search "Speak Selection" in Obsidian → Settings → Community Plugins. ### Manual Copy `main.js` and `manifest.json` into `.obsidian/plugins/speak-selection/`. ## Usage 1. Select text in the editor 2. Right-click → **朗读选中文字**, or run **"朗读选中文字"** from the command palette 3. The plugin detects the language and speaks ## Supported Languages | Language | Code | Detection | |----------|------|-----------| | 中文(普通话) | zh-CN | CJK unified ideographs | | 中文(台灣) | zh-TW | — (default only) | | 日本語 | ja-JP | Kana (hiragana/katakana) | | 한국어 | ko-KR | Hangul syllables | | Deutsch | de-DE | Umlauts/ß, or scoring-based detection | | English (US) | en-US | Default when no other language matches | | English (UK) | en-GB | — (default only) | | Français | fr-FR | — (default only) | | Español | es-ES | — (default only) | | Italiano | it-IT | — (default only) | | Português (PT) | pt-PT | — (default only) | | Português (BR) | pt-BR | — (default only) | | Русский | ru-RU | Cyrillic characters | | العربية | ar-SA | Arabic script | | हिन्दी | hi-IN | Devanagari script | | ไทย | th-TH | Thai script | | Nederlands | nl-NL | — (default only) | | Polski | pl-PL | — (default only) | | Türkçe | tr-TR | — (default only) | | Svenska | sv-SE | — (default only) | | Norsk (Bokmål) | nb-NO | — (default only) | | Dansk | da-DK | — (default only) | | Suomi | fi-FI | — (default only) | | Ελληνικά | el-GR | — (default only) | | Čeština | cs-CZ | — (default only) | | Tiếng Việt | vi-VN | — (default only) | Languages marked "— (default only)" are not auto-detected but can be set as the fallback language in settings. ## Settings - **Auto-detect language**: when enabled, the plugin automatically determines the language from the selected text. When disabled, the default language is always used. - **Default language**: the fallback language when auto-detection is off or uncertain. - **Speech rate**: slider from 0.5x to 2.0x (default 0.9). ## Requirements - Obsidian ≥ 0.15.0 - Desktop only (uses Web Speech API) ## License MIT