stsaz / phiola

Fast audio player, recorder, converter for Windows, Linux & Android
BSD 2-Clause "Simplified" License
119 stars 7 forks source link

Background recording CLI not working #37

Open doxgt opened 6 months ago

doxgt commented 6 months ago

Thanks for this little gem first of all.

I am not getting success with the following command with full paths (I am using it entirely portably):

C:\Users\username\Documents\phiola-2.0.24-windows-x64\phiola-2\phiola.exe -Background record -o C:\Users\username\Desktop\Recording.m4a -remote

Did I miss something? I thought I was following the documentation to a tee:

Appreciate any help you can give.

P.S., it seems that the following works, interestingly: C:\Users\username\Documents\phiola-2.0.24-windows-x64\phiola-2\phiola.exe -Background -Debug record -o C:\Users\username\Desktop\Recording.m4a -remote

Not sure why.

stsaz commented 6 months ago

Hi! I tried similar command with full paths and it worked fine, without -Debug switch. phiola could fail in your case, for example, if the output file already existed.

I think I need to add logging to a file, otherwise we can't see how and why phiola fails in background mode.

doxgt commented 6 months ago

Thanks for checking. Indeed I cannot reproduce it now. Perhaps I didn't realize that the output file had already existed. Sorry for the false alarm.

Three lead-in questions if you wouldn't mind (if you wish me to post them somewhere else, let me know):

  1. The .m4a file recorded through phiola could not be opened by Windows 10's Voice Recorder for playback, nor could it be opened by Windows Media Player. However, upon sending it to OpenAI for transcription, there was zero problem. I could also open the file for playback on VLC. I am wondering why. This is more or less a matter of curiosity for me.

  2. Could there be an option, through a -flag, whereby user would be able to overwrite any existing audio file? This would be a desirable user-selectable behaviour, whereby it would further save steps so that I would no longer have to delete the existing file as I am sending the same file name to OpenAI for transcription, over and over again.

  3. Phiola is indeed incredibly fast and nimble, which is great for "open-and-close use". However, I wonder, given its CPU and memory footprint is so low, would I be able to keep Phiola running and still control the running instance through CLI? Wouldn't that make it even faster?

As it stands, phiola works like a dream for my usage scenario. Thanks for making it available. On a side note, are there "sponsorship" or PayPal links for any monetary gestures of appreciation in relation to this tool?

stsaz commented 6 months ago

The .m4a file recorded through phiola could not be opened by Windows 10's Voice Recorder for playback, nor could it be opened by Windows Media Player.

Probably WMP expects some data within a .mp4 file, but phiola doesn't put it there. Thanks for the info!

Could there be an option, through a -flag, whereby user would be able to overwrite any existing audio file?

Of course there is, pass -force or just -f but just be careful with the file names.

would I be able to keep Phiola running and still control the running instance through CLI?

That's what -remote + phiola remote ... actually do. However, currently there's no way to start a new recording with phiola remote command after it has been stopped. I need to research if this feature can be easily added.

are there "sponsorship" or PayPal links

I'm afraid not at this moment, just because I live in Russia :)

doxgt commented 5 months ago

Thanks very much for letting me know about the -Background record -f -o option for file overwrite!

stsaz commented 5 months ago

I think I need to add logging to a file, otherwise we can't see how and why phiola fails in background mode.

Added in v2.1-beta3

However, currently there's no way to start a new recording with phiola remote command after it has been stopped. I need to research if this feature can be easily added.

It turns out this feature is not easy to add. It will require for exe module to somehow pass the recording track configuration to remote module... Looks too complex for now.

stsaz commented 5 months ago

As it stands, phiola works like a dream for my usage scenario.

@doxgt I've created the page where everyone can post links to their work. https://github.com/stsaz/phiola/issues/38 Please feel free to add your project there (if you want).

Ducke1001 commented 5 months ago

On Windows, I get an error message with the option -f

9260 ERROR unknown option '-f'. Use '-h' for usage info.

stsaz commented 3 months ago

The .m4a file recorded through phiola could not be opened by Windows 10's Voice Recorder for playback, nor could it be opened by Windows Media Player.

I spent some time trying to figure out the root cause, but no luck. It would be quite easy to solve this if I had an open source example, but since all Windows software is proprietary, it needs some serious reverse engineering... For now I can only recommend using ffmpeg to rewrite m4a files that phiola creates.

doxgt commented 3 months ago

The .m4a file recorded through phiola could not be opened by Windows 10's Voice Recorder for playback, nor could it be opened by Windows Media Player.

I spent some time trying to figure out the root cause, but no luck. It would be quite easy to solve this if I had an open source example, but since all Windows software is proprietary, it needs some serious reverse engineering... For now I can only recommend using ffmpeg to rewrite m4a files that phiola creates.

Thanks for following up on that. It is moot in my case as the recorded m4a/mp4 files by phiola can be parsed by OpenAI for transcription just fine. Also VLC can play the recording back as well. So in essence, it is currently inconsequential for me that WMP or Windows Voice Recorder do not play nice with the recordings.