Underground-Digital/Workflow-Engine
0
1import os
2
3from core.model_runtime.model_providers.gitee_ai.tts.tts import GiteeAIText2SpeechModel
4
5
6def test_invoke_model():
7 model = GiteeAIText2SpeechModel()
8
9 result = model.invoke(
10 model="speecht5_tts",
11 tenant_id="test",
12 credentials={
13 "api_key": os.environ.get("GITEE_AI_API_KEY"),
14 },
15 content_text="Hello, world!",
16 voice="",
17 )
18
19 content = b""
20 for chunk in result:
21 content += chunk
22
23 assert content != b""
24 