Closed SankethBK closed 11 months ago
hey @SankethBK, I would love to try this. Could you please assign this issue to me?
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
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()
.