import unittest
from yarngpt.core import generate_speech

class TestGenerateSpeech(unittest.TestCase):
    def test_generate_speech_output(self):
        text = "Hello, this is a test."
        audio = generate_speech(text)
        # Ensure we get a non-empty result (adjust this based on the actual output type, e.g., torch.Tensor, numpy array, or bytes)
        self.assertIsNotNone(audio)
        # Example: if it's a tensor, check if it has a 'shape' attribute:
        self.assertTrue(hasattr(audio, 'shape') or isinstance(audio, list))

if __name__ == '__main__':
    unittest.main()
