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

opus_file.bytes_per_sample missing #103

Open
kdulep opened this issue Nov 8, 2022 · 0 comments
Open

opus_file.bytes_per_sample missing #103

kdulep opened this issue Nov 8, 2022 · 0 comments

Comments

@kdulep
Copy link

kdulep commented Nov 8, 2022

import wave
import pyogg

AUDIO_FILE = 'voice.ogg'
AUDIO_WAV = 'voice.wav'

opus_file = pyogg.OpusFile(AUDIO_FILE)
print(opus_file.bytes_per_sample)

wave_out = wave.open(AUDIO_WAV, "wb")
wave_out.setnchannels(opus_file.channels)
wave_out.setsampwidth(opus_file.bytes_per_sample)
wave_out.setframerate(opus_file.frequency)
wave_out.writeframes(opus_file.buffer)

AttributeError: 'OpusFile' object has no attribute 'bytes_per_sample'

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

1 participant