Azure 语音
Azure语音工具规范 #
基类:EventBaseToolSpec
Azure Speech 工具规范。
workflows/handler.py 中的源代码llama_index/tools/azure_speech/base.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
text_to_speech #
text_to_speech(text: str) -> None
该工具接受自然语言字符串,将使用 Azure 语音服务创建文本的音频版本,并在用户计算机上播放。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
text
|
str
|
要播放的文本 |
required |
workflows/handler.py 中的源代码llama_index/tools/azure_speech/base.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
speech_to_text #
speech_to_text(filename: str) -> List[str]
该工具接受一个语音音频文件的文件名,并使用 Azure 将其转录为文本。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
filename
|
str
|
要转录的文件名称 |
required |
workflows/handler.py 中的源代码llama_index/tools/azure_speech/base.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
选项: 成员:- AzureSpeechToolSpec