storypad icon indicating copy to clipboard operation
storypad copied to clipboard

Voice Journaling

Open theachoem opened this issue 10 months ago • 7 comments

theachoem avatar Mar 02 '25 18:03 theachoem

I could help you if you need it regarding the CustomBlockEmbed to enable this feature.

CatHood0 avatar Mar 06 '25 00:03 CatHood0

I am deciding whether to store them seperately from editor or inside editor. Will look for some inspiration first.

But I have idea of how we can save them. In StoryPad, we had a table call Assets, which we use to save image. We can use that to save voice.

It is also easy to backup because I already had logics to backup & upload all assets to cloud.

What we need is just save it to db and render UI.

theachoem avatar Mar 06 '25 02:03 theachoem

You could save the file URL in the Embed, and just cache the value you need (saves you from downloading said audio). I mention using URLs because it would be better to have that (you can internally accept base64, bytes or URLs), since certainly, storing bytes or base64 in Flutter Quill's Json would increase the size unnecessarily.

This reduces some of the hassle. But with this comes a small detail that I'll fix soon: How do you know when it's deleted? We can make a checker when the document is going to be saved in the lastest_content, but that would be expensive, and to be honest, it's putting unnecessary code, when the solution for Flutter Quill is simple: add the ability to listen to deletions made through the keyboard.

CatHood0 avatar Mar 06 '25 02:03 CatHood0

Every asset in the assets table will be stored in file only, we will not use base64.

theachoem avatar Mar 06 '25 18:03 theachoem

@theachoem I was reading through this issue and got curious — is the voice recording feature mainly about storing and playing audio, or does it also consider speech-to-text input?

I’ve had some experience with STT in Flutter, so I was just wondering if that might be relevant here.

iljinjung avatar Mar 31 '25 10:03 iljinjung

@iljinjung It is voice recording only for this feature scope.

theachoem avatar Mar 31 '25 10:03 theachoem

Got it, thanks for the clarification! 😊

iljinjung avatar Mar 31 '25 10:03 iljinjung