Skip to content

simpleclub/tex_to_speech_flutter

Repository files navigation

TeX to Speech plugin

Contains a Flutter plugin for converting LaTeX to speakable text that can be read aloud by a text-to-speech engine.

Using in Flutter project

Add the following dependency to your pubspec.yaml file:

dependencies:
  tex_to_speech:
    git:
      url: git@github.com:simpleclub/tex_to_speech_flutter
      ref: 0.0.3
      path: tex_to_speech

Dependencies

The plugin depends on flutter_rust_bridge project to create a bindings and glue code between Rust implementation and Dart APIs.

Rust crates used

  • MathCAT - a library for producing speech text from MathML. It can also have other features (Braille support, text-to-speech) which are not used.
  • pulldown_latex - a library for converting LaTeX to MathML. It may limit the number of TeX commands that can be correctly converted. See Unsupported Plain-TeX & LaTeX behavior for details.

Requirements

Build process

flutter_rust_bridge_codegen generate

Web

flutter_rust_bridge_codegen build-web --release -o ..

Troubleshooting

  • If you encounter issue with loading the WASM file try running cargo update in tex_to_speech/rust project directory.
  • Check SETUP_NOTES.md for informations about steps to setup the project.

Update process

Follow steps in the flutter_rust_bridge_codegen documentation to update the source code. After that you can run generate_update.sh to prepare the update. Updated sources (and binaries) should be pushed to the repository.

About

Flutter bridge to MathCAT (Rust library) tex to speech feature

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors