It seems that at line
https://github.com/Zuzu-Typ/PyOgg/blob/master/pyogg/opus.py#L1221
second argument of list libopusenc.ope_encoder_write.argtypes = [ooe_p, c_float_p, c_int] must be pointer to int16, not to float.
(int ope_encoder_write(OggOpusEnc enc, const opus_int16 pcm, int samples_per_channel))
It seems that at line https://github.com/Zuzu-Typ/PyOgg/blob/master/pyogg/opus.py#L1221 second argument of list
libopusenc.ope_encoder_write.argtypes = [ooe_p, c_float_p, c_int]
must be pointer to int16, not to float. (int ope_encoder_write(OggOpusEnc enc, const opus_int16 pcm, int samples_per_channel))