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,26 @@
"""
TextToAudio module tests
"""
import unittest
from txtai.pipeline import TextToAudio
class TestTextToAudio(unittest.TestCase):
"""
TextToAudio tests.
"""
def testTextToAudio(self):
"""
Test generating audio for text
"""
tta = TextToAudio("hf-internal-testing/tiny-random-MusicgenForConditionalGeneration")
# Check that data is generated
audio, rate = tta("This is a test")
self.assertGreater(len(audio), 0)
self.assertEqual(rate, 24000)