Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Text to Speech

Plugin for Obsidian

GitHub package.json version GitHub manifest.json dynamic (path) GitHub libera manifesto

Features:

  • Start playback for note from statusbar and ribbon
  • Only speaking selected text in edit mode: Selection Demo
  • usable with other plugins (currently RSS Reader)

You can create language specific voices, which will be used when you have a note with lang: {languageCode} in the Frontmatter. The language code can be seen in the settings and is a two letter ISO 639-1 code.

This plugin will NOT work on android due to this bug in the Webview.

Adding languages

This plugin uses the native API of your Operating System, to add a new language reference the documentation accordingly:

Installing the plugin

  • Settings > Third-party plugins > Community Plugins > Browse and search for Text to Speech
  • Using the Beta Reviewers Auto-update Tester plugin with the repo path: joethei/obsidian-tts
  • Copy over main.js, styles.css, manifest.json from the releases to your vault VaultFolder/.obsidian/plugins/obsidian-tts/.

API

You can use this plugins API to add Text to Speech capabilities to your plugin.

//@ts-ignore
if (this.app.plugins.plugins["obsidian-tts"]) {//check if the plugin is loaded
	//@ts-ignore
	const tts = this.app.plugins.plugins["obsidian-tts"].ttsService;
	await tts.say(title, text, language);//language is optional, use a ISO 639-1 code
	tts.pause();
	tts.resume();
	tts.stop();
	tts.isSpeaking();
	tts.isPaused();
}