At some point I came up with the idea of providing the spoken stuff with subtitles and to publish them as a funny video. The only problem: creating such a video is very complex. With exporting the data from the iPhone, setting the texts and also the understanding of the spoken, I have to spend four to eight hours in a single video. That was a long time ok for me, because I simply worked on this video on long voyages as a passenger. Then, however, the charm caught me, to build a clean and smart solution that fits in my "smart apartment". Actually, I was annoyed anyway that I had to think on starting the app every night before I went to bed.
Nein, das geht nicht. Haha. Thomas Kekeisen im Schlaf vor sich her geredet ( Video)
Since I really wanted to automate the entire "video generation process" from the recorded language to the finished video, my program had of course also to offer a web interface for cutting the audio files. Finally I decided to use node.js as server, Jade as template engine and Bootstrap and wavesurfer.js for the frontend. At this point also a thanks to Michael Malura, he supported me with a lot of questions related to node.js.
I worked hard on this idea from december 2015 to roughly april 2016. I learned a lot of the new components I decided to use and wrote a version of my idea that basically worked. Then, however, the desire had left me and I finished the project months later in september 2016 and after about 400 Commits in a version that was satisfactory for myself. In addition to clean code and a neat structure, I also tried to implement a simple installation script to also allow users with a very small linux experience to use PiSleepTalk. On a fresh Raspberry Pi, the complete system installation is completed with a 39 character long command and some time - about two to four hours.
Lauter oder lauter, du hast die Wahl! Thomas Kekeisen im Schlaf vor sich her geredet ( Video)
Towards the end of the development, debugging was the biggest challenge. Because how should you check code, that runs while you are sleeping? I spent a couple of nights to find the best microphone settings since I had to "sleep over" the settings to check the results on the next morning. For the remaining problems - and you come across a lot of them when you use sox and ffmpeg - I solved by switching off some parts of the file processing in order to save the resulting file system. So I could restore the recordings again and again to restart the processing on the RaspberryPi. To check when and for what reasons my Raspberry Pi sometimes stopped or started recording, I had set up some info push messages. So I had a log on my iPhone directly in the next morning. The push messages themselves were, of course, sent silent.
The finished PiSleepTalk is open source on GitHub. In addition to the complete documentation and installation instructions, you can find some open issues in the issues area. I may implement in the future. Of course, I am very happy about contributions.
In the meantime, I have been using my installation for three months now and have produced three videos with a relatively low effort. Sometimes it happens that the SD card of my Raspberry is too full - still a unfixed problem. I suspect that by switching from a cheap USB microphone to a professional studio microphone, the recorded files have become many times larger.