feat(server): support n8n OpenAI audio transcription

Signed-off-by: LauraGPT <[email protected]>
This commit is contained in:
LauraGPT
2026-09-02 03:20:13 +00:00
parent a63ededd85
commit 1c9b4b9958
4 changed files with 53 additions and 0 deletions
+10
View File
@@ -122,6 +122,16 @@ Recommended HTTP Request settings:
After the request, use `{{$json.text}}` as the transcript. If `verbose_json` is enabled, route `{{$json.segments}}` to subtitle, speaker, or QA steps.
### n8n OpenAI Audio node
The built-in OpenAI node can also run its Audio > Transcribe operation against
FunASR. In OpenAI credentials, set Base URL to
`http://<funasr-host>:8000/v1` and provide any non-empty API key. The node
always sends `model=whisper-1`; FunASR maps that compatibility alias to the
model selected when the server starts. This path is transcription-only. Use the
HTTP Request node above when you need `verbose_json`, segments, or speaker
labels.
## Webhook worker pattern
Use this when the workflow engine cannot send multipart files reliably or when audio needs pre-processing.
+8
View File
@@ -121,6 +121,14 @@ def transcribe_from_url(audio_url: str) -> dict:
请求之后,使用 `{{$json.text}}` 作为转写文本。如果启用了 `verbose_json`,可以把 `{{$json.segments}}` 传给字幕、说话人分析或质检节点。
### n8n OpenAI Audio 节点
也可以让内置 OpenAI 节点的 Audio > Transcribe 操作调用 FunASR。在 OpenAI
凭据中将 Base URL 设为 `http://<funasr-host>:8000/v1`,并填写任意非空 API
key。该节点固定发送 `model=whisper-1`,FunASR 会将这个兼容别名映射到服务
启动时选择的模型。此路径只返回转写文本;需要 `verbose_json`、分段或说话人
标签时,仍使用上面的 HTTP Request 节点。
## Webhook worker 模式
当工作流引擎不能稳定发送 multipart 文件,或音频需要预处理时,可以把转写封装成一个内部 webhook worker。