Skip to content

Speech-to-Text

Introduction

Speech-to-Text (STT) models can quickly and accurately convert speech input into text, providing robust support for applications such as speech recognition, automatic transcription, and intelligent assistants. Whether used in meeting notes, customer service, real-time captioning, or in educational and medical settings, STT models show tremendous potential. They not only improve work efficiency but also greatly enhance user experience, making information access and processing more convenient.

Next, we will explore some best practices for utilizing STT models to help you effectively leverage this advanced technology in practical applications.

Best Practices

Using MaaS Whisper as an example

Request:

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'

Response:


{
  "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."
}