Share & Read Aloud

unlisted

by BenedictKing

Clean Markdown into readable text. Share, copy, or read aloud with TTS.

Updated 23d agoMIT
View on GitHub

English | 中文

Share & Read Aloud

An Obsidian plugin that cleans Markdown into readable text for sharing/copying, or reads it aloud via TTS.

Features

Text cleaning & sharing

  • Cleans Markdown (frontmatter, links, code blocks, tables, etc.) into readable plain text
  • System share → clipboard fallback → preview modal

TTS read aloud

  • Synthesizes speech from the cloud TTS API for the current note or selected text
  • Long text is split into balanced segments; subsequent segments are prefetched with at least 1s between request starts
  • Playback controls: pause/resume, previous/next segment, progress slider, speed toggle (0.75x–2.0x)
  • IndexedDB audio cache to avoid redundant API calls
  • Save audio to vault (WAV)

Commands

Share / Copy

CommandDescription
Share cleaned current noteShare the current note via system share sheet
Copy cleaned current noteCopy cleaned note text to clipboard
Share cleaned selected textShare selected text via system share sheet
Copy cleaned selected textCopy cleaned selected text to clipboard

TTS read aloud

CommandDescription
Read note aloudRead the entire current note
Read selection aloudRead the selected text
Stop readingStop playback
Pause/Resume readingPause or resume playback
Save current TTS audio to vaultExport current audio to a WAV file in your vault
Clear TTS audio cacheClear all cached audio

Settings

Configure under Obsidian Settings → Community plugins → Share & Read Aloud:

  • API key — MiMo platform API key (get one at platform.xiaomimimo.com)
  • Model — TTS model (preset voice / voice design / voice clone)
  • Voice — Preset voice selection (Bingtang, Moli, Suda, Baihua, Mia, Chloe, etc.)
  • Style instruction — Style directive (e.g., "read gently and steadily")
  • Default playback speed — Initial playback speed
  • Target segment characters — Target character count per group (recommended: 300–500)
  • Concurrent prefetch groups — Number of segments to prefetch (default: 4; requests spaced ≥1s apart)
  • Cache — Cache toggle and expiry days
  • UI — Player bar and toast notification toggles

Installation

Community plugins

In Obsidian, go to Settings → Community plugins and search for Share & Read Aloud, then click Install.

Manual

Copy these files into .obsidian/plugins/share-and-read-aloud/:

  • manifest.json
  • main.js
  • styles.css

Development

npm install
npm run build

Project structure

obsidian-share-and-read-aloud/
├── src/
│   ├── main.ts              # Plugin entry + command registration
│   ├── settings.ts          # Settings interface + settings tab
│   ├── constants.ts         # API config, voice presets
│   ├── normalize.ts         # Markdown text cleaning
│   ├── tts-client.ts        # MiMo TTS API client
│   ├── text-segmenter.ts    # Long text segmentation
│   ├── audio-player.ts      # Audio playback engine
│   ├── audio-cache.ts       # IndexedDB cache
│   ├── player-bar.ts        # Playback control bar UI
├── docs/
│   └── mimo-tts-api.md      # MiMo TTS API documentation
├── esbuild.config.mjs
├── eslint.config.mjs
├── styles.css
├── manifest.json
├── package.json
├── tsconfig.json
└── versions.json

MiMo TTS preset voices

VoiceIDLanguageGender
Bingtang冰糖ChineseFemale
Moli茉莉ChineseFemale
Suda苏打ChineseMale
Baihua白桦ChineseMale
MiaMiaEnglishFemale
ChloeChloeEnglishFemale
MiloMiloEnglishMale
DeanDeanEnglishMale

Style control

Supports audio style tags in the text:

  • (Happy)What a beautiful day!
  • (Lazy)Let me sleep five more minutes…
  • (Deep)The night has fallen, but the city breathes on.

Natural language style instructions are also supported — fill in the Style instruction field in settings.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.