-
Notifications
You must be signed in to change notification settings - Fork 133
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
NewContext can be called only once #60
Comments
I think this is an implementation issue in beep @faiface ? |
Looks like beep calls What kind of code are you trying to execute? |
https://github.com/HowlSlack/app/blob/master/howl/audio.go#L20 It's a pretty simple app that reads incoming messages from a slack channel and then reads them out loud. I should propose to make a |
My guess is that |
Thank you @hajimehoshi for your time. |
Oh have you solved this? Thank you for compliments! |
I did what you suggested. The issue is that this way the speaker has a fixed sample rate. Imagine you receive audio from multiple sources with different sample rates: that could not work. I did a workaround to resample the audio streams: Only thing that is mysterious to me is that I ask an audio stream with 22050 sample rate to AWS Polly I need to set the speaker's sample rate to 12000 in order to play the sound correctly. And if I ask an audio stream with a 16000 sample rate I need to set the speaker sample rate to 8000 in order to play it properly. IMHO, But all of this is more a problem in |
@AkselsLedins Yeah, resampling is what you're supposed to do when you have different sample rates. Btw, @hajimehoshi, in Beep, you're supposed to call |
Oto doesn't allow it? Now unfortunately it is impossible to reset the sample rate so far. |
So, Oto does or does not allow it? It did allow it before, and Beep was using that. |
No, Oto doesn't allow it. Even if you could do it, you were just lucky... Of course we can change the specification and fix the implementation (perhaps we wouldn't need any change but at least we need to double-check). However, IMHO, I don't think changing sample-rate is an important feature... |
Changing sample rate is important for my app (GitHub.com/cswank/mcli). I have a collection of flac files that I bought from Bandcamp and so far there are 3 different sample rates in the collection. Calling beep’s speaker.Close() and then speaker.Init() with a new sample rate works fine on a Linux machine but hangs somewhere in the oto code on MacOS. I’ll be digging in to find out more, but I thought I’d just mention the fact for now. |
Please see #149 for the discussion to implement this. |
Thank you for the reply, that's good to know. |
Hello FYI,
It's may be related to 3459272
And maybe it belongs to : https://github.com/faiface/beep
I don't know I'm not sure
Thanks
The text was updated successfully, but these errors were encountered: