跳转至

语音生文本

介绍

Speech-to-Text(STT)语音生文本模型能够将语音输入快速、准确地转换为文本,为语音识别、自动转录、智能助手等应用提供了强有力的支持。无论是在会议记录、客户服务、实时字幕,还是在教育和医疗等各个场景中,语音生成文本模型都展现出了巨大的应用潜力。它不仅提升了工作效率,还大大增强了用户体验,使信息获取和处理更加便捷。

接下来,我们将探讨语音生成文本模型的一些最佳实践,以帮助您在实际操作中充分利用这一先进技术。

最佳实践

以MaaS Whisper为例

请求为:

curl --request POST \
--url https://genaiapipre.cloudsway.net/v1/ai/RkBOAlaW/audio/transcriptions \
--header 'Accept: */*' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Connection: keep-alive' \
--header 'Content-Type: multipart/form-data' \
--header 'Host: genaiapipre.cloudsway.net' \
--header 'content-type: multipart/form-data' \
--form 'prompt=A poetic description of early morning, including words like dawn, quiet, mist, and possibility' \
--form response_format=verbose_json \
--form temperature=0.1 \
--form language=zh \
--form timestamp_granularities=none \
--form 'file=xxx.wav'

返回结果为:

{
  "text": "In this ancient town, plum blossoms bloom silently. The white petals are like snow, falling on the branches, welcoming the cold winter. The fragrance of the flowers is elegant, and it touches the heart, as if it is the scent of time. In this ancient town, plum blossoms bloom silently. Every plum blossom is a small miracle, which blooms in the coldness of life. They are not afraid of the cold, they are firm, symbolizing hope and rebirth. The blooming of plum blossoms is like the praise of nature for life, warming everyone's heart. Each blossom is a small miracle, symbolizing hope and rebirth. Standing under the plum trees, it is as if you can hear the rain of years. Flowers bloom and fall, spring and autumn come. Plum blossoms witness the turning of time, and witness people's joy and sorrow. They are the guardians of memory, quietly preserving the story of this town. Standing under the plum tree, one can almost hear the whispers of time. Plum blossoms are not just a plant, but also a spiritual symbol. It teaches us to keep hope in adversity, to find warmth in the cold winter. Every year's blooming is a praise of life, a hope for the future. Plum blossoms teach us to keep hope alive in adversity. Let's cherish the beauty before us and embrace every moment of life bravely. Let's cherish the beauty before us and embrace every moment of life bravely."
}