Socket
Socket
Sign inDemoInstall

capacitor-tts

Package Overview
Dependencies
2
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    capacitor-tts

This is Ionic Capacitor native Text-To-Speech plugin for IOS & Android


Version published
Weekly downloads
2
Maintainers
1
Install size
747 kB
Created
Weekly downloads
 

Readme

Source

Capacitor Text-To-Speech

Platform

  • Android

Installation

npm i capacitor-tts

Getting Start

import { TextToSpeech, Local } from 'capacitor-tts';

const tts = new TextToSpeech({
    local: Local.US,
    rate:  1.0,
    pitch: 1.0
});

tts.speak({value: 'Text to speech'})
    .then(res => {
        console.log(res);
    })
    .catch(err => {
        console.error(err);
    })

API

Class
TextToSpeech
Methods

Open Installed text to speech activity

openInstallTts(): Promise<{value: null}>;

Check available languages

checkLanguage(): Promise<{values: string[]}>;

Set voice pitch

setPitch(options: { pitch: number }): Promise<{ value: boolean }>;   

Set talking speed

setSpeechRate(options: { rate: number }): Promise<{ value: boolean }>;

Speak from text

speak(options: { text: string }): Promise<{ value: boolean }>;

Stop text to speech engine

stop(): Promise<{ value: boolean }>; 
Types
export interface TTSOptions {
    
    local: Local;
    
    rate?: number,
    
    pitch?: number,
}
Enums
export enum Local {
    US     = 0,
    UK     = 1,
    FRANCE = 2
}

Keywords

FAQs

Last updated on 24 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc