chore: import upstream snapshot with attribution
build / build (macos-latest) (push) Has been cancelled
build / build (ubuntu-latest) (push) Has been cancelled
build / build (windows-latest) (push) Has been cancelled
minimal / deploy (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:38:00 +08:00
commit 3a7c47b2a6
623 changed files with 133790 additions and 0 deletions
@@ -0,0 +1,29 @@
"""
AudioMixer module tests
"""
import unittest
import numpy as np
from txtai.pipeline import AudioMixer
class TestAudioStream(unittest.TestCase):
"""
AudioStream tests.
"""
def testAudioStream(self):
"""
Test mixing audio streams
"""
audio1 = np.random.rand(2, 5000), 100
audio2 = np.random.rand(2, 5000), 100
mixer = AudioMixer()
audio, rate = mixer((audio1, audio2))
self.assertEqual(audio.shape, (2, 5000))
self.assertEqual(rate, 100)