This is a frugal audio diary, which receives e-mails with attached voice messages, performs speech recognition, creates a RSS feed from the results, and adds a stylesheet to create a web page from the feed.
- Prepare local directory that is reachable on your web server; this will be the feed directory of the diary; it should be owned by user
nobody
and groupnogroup
; note the URL and the absolute path of the directory - Place files
enqueue.py
,daemon.py
, andtohtml5.xsl
into a separate directory; the usernobody
should be able to execute files there; install whisper.cpp into the same directory, also download the medium model to the same location; should you install whisper.cpp to another directory, please adjust the paths in the filedaemon.py
; installffmpeg
to convert audio files to the format preferred by whisper.cpp (for example on Debian:apt-get install ffmpeg
) - In file
aliases
, replace username with the user part of the e-mail address you will send e-mails with audio attachments to, and the /feed_dir with the absolute path of the feed directory; append the resulting file to the system-widealiases
file (for example on Debian:/etc/aliases
) and update the mail aliases database by executingnewaliases
- In file
audiodiary.service
, replace /feed_dir with the absolute path of the feed directory, and https://feed_url with it's URL; copy the file to thesystemd
services directory (for example on Debian:/etc/systemd/system
), start it using commandsystemctl start audiodiary
and test the setup by sending an e-mail with audio attachment to the e-mail address of your choice - Persist the setup by executing command
systemctl enable audiodiary
- Access the URL you entered in step 4; if you see list of files and your test file, everything works as expected; access the file
index.xml
therein; you should see a web page with your test file embedded and with the recognised text beside it