Hello, Graham Inggs, le sam. 30 nov. 2024 17:41:54 +0000, a ecrit: > The autopkgtests of this package fail with Python 3.13 [1].
It looks like python 3.13 now requires the iterator (not just the interable) to provide an __iter__ method. I don't see how to do that with the pocketsphinx interface: there is ps_seg_next method to get the next one, but no method that would allow to duplicate a ps_seg_t. I guess we'll just have to bite the bullet and upload pocketsphinx 5 without waiting for parlatype, subtitlecomposer and ffmpeg to catch up, unless somebody knows how to fix this. Samuel > [1] https://ci.debian.net/packages/p/pocketsphinx-python/testing/amd64/ > > > 67s =================================== FAILURES > =================================== > 67s ___________________ TestRawDecoder.test_raw_decoder_segments > ___________________ > 67s > 67s self = <tests.test_decoder.TestRawDecoder > testMethod=test_raw_decoder_segments> > 67s > 67s def test_raw_decoder_segments(self): > 67s > self.assertEqual(self.ps.segments(), [ > 67s '<s>', '<sil>', 'go', 'forward', 'ten', 'meters', '</s>' > 67s ]) > 67s > 67s tests/test_decoder.py:52: > 67s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ > 67s > 67s self = <pocketsphinx.Pocketsphinx; proxy of <Swig Object of type > 'Decoder *' at 0x7f4c03ee2d60> > > 67s detailed = False > 67s > 67s def segments(self, detailed=False): > 67s if detailed: > 67s return [ > 67s (s.word, s.prob, s.start_frame, s.end_frame) > 67s for s in self.seg() > 67s ] > 67s else: > 67s > return [s.word for s in self.seg()] > 67s E TypeError: 'SegmentIterator' object is not iterable > 67s > 67s /usr/lib/python3/dist-packages/pocketsphinx/__init__.py:123: TypeError > 67s _______________________________ TestKws.test_kws > _______________________________ > 67s > 67s self = <tests.test_kws.TestKws testMethod=test_kws> > 67s > 67s def test_kws(self): > 67s segments = [] > 67s for phrase in AudioFile(lm=False, keyphrase='forward', > 67s kws_threshold=1e+20): > 67s > segments = phrase.segments(detailed=True) > 67s > 67s tests/test_kws.py:41: > 67s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ > 67s > 67s self = <pocketsphinx.AudioFile; proxy of <Swig Object of type > 'Decoder *' at 0x7f4c03136490> > > 67s detailed = True > 67s > 67s def segments(self, detailed=False): > 67s if detailed: > 67s return [ > 67s (s.word, s.prob, s.start_frame, s.end_frame) > 67s > for s in self.seg() > 67s ] > 67s E TypeError: 'SegmentIterator' object is not iterable > 67s > 67s /usr/lib/python3/dist-packages/pocketsphinx/__init__.py:120: TypeError > 67s ____________________ TestPhoneme.test_phoneme_best_phonemes > ____________________ > 67s > 67s self = <tests.test_phoneme.TestPhoneme > testMethod=test_phoneme_best_phonemes> > 67s > 67s def test_phoneme_best_phonemes(self): > 67s > self.assertEqual(self.ps.segments(), [ > 67s 'SIL', > 67s 'G', > 67s 'OW', > 67s 'F', > 67s 'AO', > 67s 'R', > 67s 'W', > 67s 'ER', > 67s 'D', > 67s 'T', > 67s 'AE', > 67s 'N', > 67s 'M', > 67s 'IY', > 67s 'IH', > 67s 'ZH', > 67s 'ER', > 67s 'Z', > 67s 'S', > 67s 'V', > 67s 'SIL' > 67s ]) > 67s > 67s tests/test_phoneme.py:58: > 67s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > _ _ _ _ _ _ _ > 67s > 67s self = <pocketsphinx.Pocketsphinx; proxy of <Swig Object of type > 'Decoder *' at 0x7f4c03e388a0> > > 67s detailed = False > 67s > 67s def segments(self, detailed=False): > 67s if detailed: > 67s return [ > 67s (s.word, s.prob, s.start_frame, s.end_frame) > 67s for s in self.seg() > 67s ] > 67s else: > 67s > return [s.word for s in self.seg()] > 67s E TypeError: 'SegmentIterator' object is not iterable > 67s > 67s /usr/lib/python3/dist-packages/pocketsphinx/__init__.py:123: TypeError > > _______________________________________________ > Pkg-a11y-devel mailing list > pkg-a11y-de...@alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-a11y-devel