[Feature request] File Export stack
Hi, I primarily use Speech Note to convert Light- and Webnovel chapters into audiofiles for later listening. Now my setup isn't really strong and there is always this annoying waiting time for each exported audiofile before I can start the next. Therefore I would really appreciate some kind of stack with pending exports, so I can just add the next exports while the current one is still processing. Thanks for reading.
Hi. Thanks for the suggestion.
To queue "export to file" tasks, you can use command line interface. You can use "start-reading-text" action together with "--text" and "--output-file" options.
Short "how-to":
- Enable "Actions" in
Settings->Accessibility->Allow external application to invoke actions. - Make sure that Speech Note flatpak has permission to write to the dir where you want to save the exported audio file. For example, use Flatseal to override permissions if necessary.
- Start Speech Note normally and let it run in the background or minimized. BTW, in general, command line options should be used when the app is already running.
- Open terminal and execute (example):
flatpak run net.mkiol.SpeechNote --action start-reading-text --text "Text that I want to export" --output-file file1.mp3
flatpak run net.mkiol.SpeechNote --action start-reading-text --text "Another text that I want to export" --output-file file2.mp3
flatpak run net.mkiol.SpeechNote --action start-reading-text --text "One more to export" --output-file file3.mp3
All actions are placed in a queue and processed one after the other. Once the process is complete, you should have the files "file1.mp3", "file2.mp3" and "file3.mp3".
PS: All available command line options can be listed with:
flatpak run net.mkiol.SpeechNote --help
I tried your solution and it works as described, but still ran into some difficulties. Mainly two problems:
- First is my Terminal doesn't work well with longer texts.
- I need to format the text to make it work. Or else...
bash: !”: event not found
I probably could find a solution to these problems myself at this point, but this is not that important to me. So I just do everything with the GUI as usual. Thanks that you made time for helping. Best regards.
First is my Terminal doesn't work well with longer texts. I need to format the text to make it work. Or else... bash: !”: event not found
Yes, you have to escape special characters somehow if you want to enter text directly into the terminal. One solution is to read the text from a text file:
flatpak run net.mkiol.SpeechNote --action start-reading-text --output-file audio.mp3 --text "$(cat text.txt)"
There are probably many ways to automate this process even further by calling speech note from a script...
Thank you for bringing this interesting use case. I will consider how to make this "batch" conversion more user-friendly in a future version.