SankethBK / diaryvault

A personal diary application written in Flutter
https://play.google.com/store/apps/details?id=me.sankethbk.dairyapp
MIT License
86 stars 59 forks source link

Implement Text-to-Speech Feature for Note Content Reading #60

Closed SankethBK closed 11 months ago

SankethBK commented 11 months ago

In the NotesReadOnlyPage, we can introduce a "Play" button that, when clicked, will read aloud the contents of the note, including both the title and the body.

To accomplish this, we can leverage the flutter_tts library, which provides text-to-speech capabilities for Flutter applications.

Additionally, as part of this enhancement, we can explore the possibility of enabling background playback for the audio. This means that users can continue to listen to their notes being read even when the app is not in focus or running in the background.

For now we can use hardcoded voice type, we can make voice, pitch and other things configurable in future.

Body of the note will be in delta form, it can be converted to plainText by state.controller!.document.toPlainText().

vaibhavppandey commented 11 months ago

hey @SankethBK, I would love to try this. Could you please assign this issue to me?

SankethBK commented 11 months ago

Sure @vaibhavppandey @Night-Amber3301 has contributed some code related to this, it needs some refactoring. You can use this branch as starting point https://github.com/SankethBK/diaryvault/tree/feat/read_notes