diff --git a/rootfs/agents/studio_director/agent.toml b/rootfs/agents/studio_director/agent.toml index 65a7c07..5a5d297 100644 --- a/rootfs/agents/studio_director/agent.toml +++ b/rootfs/agents/studio_director/agent.toml @@ -1,7 +1,8 @@ instance_id = "studio_director" fullname = "tracy wang" +llm_model_name = "gpt-3.5-turbo-16k-0613" enable_function = ["text_to_speech"] [[prompt]] role = "system" -content = "你是一个故事播音员,请将下面故事改编成播音剧本,提取旁白和角色台词,以及每个角色需要有性别、年龄、以及每句台词的语气,最后生成音频文件。" +content = "你是一个故事播音员,可以将故事演播成音频,演播前需要将故事改编成播音剧本,提取旁白和角色台词,以及每个角色需要有性别、年龄、以及每句台词的语气等。如果生成了音频文件则告知你的用户。" diff --git a/rootfs/workflows/story_maker/workflow.toml b/rootfs/workflows/story_maker/workflow.toml index 540665f..6ae5e55 100644 --- a/rootfs/workflows/story_maker/workflow.toml +++ b/rootfs/workflows/story_maker/workflow.toml @@ -16,7 +16,8 @@ content=""" 你是一个语音故事制作总导演,与客户对接并向团队下达指令。你的团队分为下面几个成员:writer,studio_director。一个故事制作分成两个阶段:让writer写出故事,再交由studio_director演播故事生成音频文件。你的基本工作模式是: 1. 收到客户的明确的指令后,让writer写出故事 2. 将writer写出的故事交给studio_director演播 -3. 当你决定要和成员通信时,请使用下面形式输出需要通信的消息 +3. 获得音频文件之后,将音频文件的存放路径交给客户 +4. 当你决定要和成员通信时,请使用下面形式输出需要通信的消息 ``` ##/send_msg 成员名称 内容 diff --git a/src/aios_kernel/text_to_speech_function.py b/src/aios_kernel/text_to_speech_function.py index 2f7bff0..90dfd49 100644 --- a/src/aios_kernel/text_to_speech_function.py +++ b/src/aios_kernel/text_to_speech_function.py @@ -14,7 +14,7 @@ logger = logging.getLogger(__name__) class TextToSpeechFunction(AIFunction): def __init__(self): self.func_id = "text_to_speech" - self.description = "根据输入的剧本生成音频数据" + self.description = "根据输入的剧本生成音频文件,成功时会返回音频文件路径" def get_name(self) -> str: return self.func_id @@ -85,9 +85,9 @@ class TextToSpeechFunction(AIFunction): if audio is not None: path = os.path.join(os.path.realpath(os.curdir), "{}.mp3".format(''.join(random.sample('zyxwvutsrqponmlkjihgfedcba', 10)))) audio.export(path, format="mp3") - return "已经生成音频文件, 文件路径为{}".format(path) + return "exec text_to_speech OK,speech file store at {}".format(path) else: - return "failed" + return "exec text_to_speech failed" def is_local(self) -> bool: return True