Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background recording CLI not working #37

Open
doxgt opened this issue May 20, 2024 · 9 comments
Open

Background recording CLI not working #37

doxgt opened this issue May 20, 2024 · 9 comments

Comments

@doxgt
Copy link

doxgt commented May 20, 2024

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
Copy link
Owner

stsaz commented May 23, 2024

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
Copy link
Author

doxgt commented May 23, 2024

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
Copy link
Owner

stsaz commented May 24, 2024

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
Copy link
Author

doxgt commented May 25, 2024

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

@stsaz
Copy link
Owner

stsaz commented May 25, 2024

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
Copy link
Owner

stsaz commented May 26, 2024

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.
#38
Please feel free to add your project there (if you want).

@Ducke1001
Copy link

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

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

@stsaz
Copy link
Owner

stsaz commented Aug 10, 2024

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
Copy link
Author

doxgt commented Aug 12, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants