Skip to content

Conversation

@wkoszek
Copy link
Contributor

@wkoszek wkoszek commented Jun 21, 2025

I want to have a tech-independent way to save metadata as JSON and perhaps read it with some scripts.

POC version of MR here -- those changes [done with OpenAI Codex] look very similar across 3 files. Perhaps we should refactor this chunk of code to the separate function?

@Starmel
Copy link
Owner

Starmel commented Jun 21, 2025

Why not to use sqlite? Is embeddable database and available out of box everywhere.

@wkoszek
Copy link
Contributor Author

wkoszek commented Jun 21, 2025

@Starmel I saw there's a SQLite file above the directory where .wav files are. That's what you mean? Because from code I assume that Apple is silently using SQLIte as a store, but it can ... change?

@Starmel
Copy link
Owner

Starmel commented Jun 21, 2025

sqlite3 recordings.sqlite "select * from recordings;"

@wkoszek
Copy link
Contributor Author

wkoszek commented Jun 22, 2025

@Starmel I want to get JSONs checked into the repo, for versioning. I know the SQLite is there, and I saw we're using RecordingStore which I think is Swift's way of saying "some data store". Is Apple guaranteeing that it's going to stay to be SQLite across OSXes? If so, perhaps saving JSONs is indeed unnecessary.

@Starmel
Copy link
Owner

Starmel commented Jun 23, 2025

RecordingStore Is just a class which uses sqlite. Is not an apple framework to work with data.

To work with sqlite used popular library.

I don't think there any compatibility issues can be.

@wkoszek
Copy link
Contributor Author

wkoszek commented Jun 23, 2025

@Starmel OK. This is great. Sounds like we're already using SQLite explicitly! Let me think how to get what I want. I think I could just write a Python script to dump the SQLite from OpenSuperWhisper to my directories.

Originally I was thinking of this:

  • allow OSW to take a path config and write .wavs according to this config. Mine would be "dir/Voice/YYYY-MM-DD-hh-ss"
  • same for transcripts
  • add a checkbox to "save trascription along the sound file"

Users that want to save the transcripts to git repos would check this, and have .JSONS go to git, and .wav perhaps to a backup.

@wkoszek
Copy link
Contributor Author

wkoszek commented Jun 25, 2025

@Starmel perhaps we need a trigger of some sort? e.g.: post-recording trigger script.

@Starmel
Copy link
Owner

Starmel commented Jun 25, 2025

Probable this can help you to make trigger and catch event when transpiration ready.

https://developer.apple.com/documentation/foundation/distributednotificationcenter
https://github.com/jrauch/eventnotifier

@wkoszek
Copy link
Contributor Author

wkoszek commented Sep 7, 2025

@Starmel I'm thinking about this one - would you be OK with adding post-record hook (script call) ? I'd be able to do whatever I want if we had it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants