MCPcopy
hub / github.com/BinNong/meet-libai / audio_generation_tool

Function audio_generation_tool

qa/function_tool.py:72–81  ·  view source on GitHub ↗
(
        question: str,
        history: List[List[str] | None] = None
)

Source from the content-addressed store, hash-verified

70
71
72def audio_generation_tool(
73 question: str,
74 history: List[List[str] | None] = None
75) -> Tuple[Tuple[str, str], QuestionType]:
76 text = extract_audio_text(question, history)
77 lang = extract_language(question)
78 gender = extract_gender(question)
79 model_name = get_tts_model_name(lang=lang, gender=gender)
80 audio_file = generate_audio(text, model_name)
81 return (audio_file, "语音"), QuestionType.AUDIO
82
83
84def video_generation_tool(

Callers

nothing calls this directly

Calls 3

extract_languageFunction · 0.90
extract_genderFunction · 0.90
get_tts_model_nameFunction · 0.90

Tested by

no test coverage detected