Not quite ready for prime time. To make this work, you'll need to add two files: a .env
and a credentials.json
, both in the project root.
.env
should have the following vars:
OPENAI_API_KEY
: OpenAI API keyDROPBOX_ACCESS_TOKEN
: Dropbox Access Token (Dropbox is where recordings must be stored)DROPBOX_AUDIO_FOLDER
: Path to the folder in Dropbox where audio recordings are stored.
credentials.json
should be a Google Cloud credentials file used to integrate with Google Drive.
- Create the creds mentioned above.
- You need an audio recorder app that automatically saves to dropbox. I use "Voice Recorder By LiveBird" on iOS
npx ts-node daily.ts
for the daily wrap-upnpx ts-node weekly.ts
for the weekly wrap-up
- Collect all audio files in the dropbox folder.
- If no audio files, EXIT.
- If no folder for the year (
[YYYY]
) exists in Google Drive folderjournals
, create one. - Get the current week of the year.
- If no folder for the week number (
week_[WW]
) exists in Google Drive folder for current year, create one. - Use FFMPEG to combine into one audio file.
- Upload new audio file to Drive, in
week_[WW]/audio
with name[MM-DD-YYYY].mp3
. - Delete all files in dropbox folder.
- Send audio file to Whisper to convert to text.
- Store text as Google Doc, named
[MM-DD-YYYY]-transcript
, in current week's folder. - Send output text to ChatGPT to summarize.
- Store summary as Google Doc, named
[MM-DD-YYYY]-summary
, in current week's folder. - EXIT
- Get the current week of the year.
- Collect all summary files in the weeks folder in Google Drive.
- If no summary files, EXIT.
- Combine all summary text to one input and send to ChatGPT to summarize.
- Store returned summary in the weeks folder, named
week_[WW]_summary
- Send summary email
- EXIT
- Get the previous month
- Collect all subfolders (week folders) in the folder for that month.
- If no subfolders, EXIT.
- In each week folder, find the week summary file
- Combine all week summary files into one text.
- Send combined text to ChatGPT for summary.
- Send email including monthly summary and all weekly summaries
- EXIT