capacitor-simple-tts
TypeScript icon, indicating that this package has built-in type declarations

0.0.9 • Public • Published

Description:

Simple capacitor plugin for text-to-speech functionality on Android based on native text to speech capabilities. Based on the capacitor community text to speech plugin (which didn't work for me).

Installation:

Register the plugin in your main activity:

import com.corvoanalytics.TTSPlugin;

public class MainActivity extends BridgeActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        // Initializes the Bridge
        this.init(
            savedInstanceState,
            new ArrayList<Class<? extends Plugin>>() {

            {
                // Additional plugins you've installed go here
                // Ex: add(TotallyAwesomePlugin.class);
                add(TTSPlugin.class);
            }
            }
        );
    }
}

Usage:

import { Plugins } from "@capacitor/core";

...

await Plugins.TTSPlugin.createTSS();
await Plugins.TTSPlugin.speak({ message: TEXT_TO_BE_SPOKEN });

Readme

Keywords

Package Sidebar

Install

npm i capacitor-simple-tts

Weekly Downloads

0

Version

0.0.9

License

MIT

Unpacked Size

109 kB

Total Files

39

Last publish

Collaborators

  • projmans