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

Also send output to a new file vs just speaker #150

Open
andrewarrow opened this issue Jul 2, 2022 · 1 comment
Open

Also send output to a new file vs just speaker #150

andrewarrow opened this issue Jul 2, 2022 · 1 comment

Comments

@andrewarrow
Copy link

Hello, I have example from https://github.com/faiface/beep/wiki/Composing-and-controlling

	for {
		fmt.Print("Press [ENTER] to pause/resume. ")
		fmt.Scanln()

		speaker.Lock()
		ctrl.Paused = !ctrl.Paused
		volume.Volume += 0.5
		speedy.SetRatio(speedy.Ratio() + 0.1) // <-- right here
		speaker.Unlock()
	}

working nicely. My question is, can I also send the output to a NEW mp3 file on disk with all the pauses (added silence) and the speed increases as the user controls them? That is they play the original source.mp3 file (say it's 1 minute long) and hit pause as they like, and speed it up, slow it down etc. and the end result is 2 minutes of audio played through the speaker. Can I have that 2 minute of new audio as a new mp3 file?

@gilwo
Copy link

gilwo commented Jul 25, 2022

theoretically there is no problem doing that. but there is no mp3 Encode support in the beep library at the moment.
you can, if you wish, use the wav encode method to write as a wave and later (or offline) to convert to mp3.

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

2 participants