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