Fun-ASR/Paraformer モデルによる音声ファイル認識機能は、事前に録音された音声をテキストに変換します。単一ファイル処理とバッチ処理の両方をサポートしており、リアルタイム以外のシナリオに適しています。
主な特徴
多言語対応:中国語(さまざまな方言を含む)、英語、日本語、韓国語、ドイツ語、フランス語、ロシア語など、複数の言語での文字起こしをサポートします。
広範なフォーマット対応:サンプルレートを問わず、AAC、WAV、MP3 などの主要な音声フォーマットをサポートします。
長尺音声ファイル処理:最大 12 時間、2 GB までの音声ファイルに対して非同期文字起こしをサポートします。
歌唱認識:BGM(バックグラウンドミュージック)が含まれる楽曲全体を文字起こしできます。(この機能は fun-asr および fun-asr-2025-11-07 モデルでのみサポートされています。)
豊富な認識機能:話者分離、禁止用語フィルタリング、文および単語レベルのタイムスタンプをサポートします。
提供状況
サポートされているモデル:
国際
「国際デプロイメントモード」では、エンドポイントおよびデータストレージはシンガポール リージョンに配置されます。モデル推論用のコンピューティングリソースは中国本土を除くグローバルで動的にスケジュールされます。
以下のモデルを呼び出すには、シンガポール リージョンのAPI キーを使用してください。
Fun-ASR:fun-asr(安定版、現時点で fun-asr-2025-11-07 と同等)、fun-asr-2025-11-07(スナップショット)、fun-asr-2025-08-25(スナップショット)、fun-asr-mtl(安定版、現時点で fun-asr-mtl-2025-08-25 と同等)、fun-asr-mtl-2025-08-25(スナップショット)
中国本土
「中国本土デプロイメントモード」では、エンドポイントおよびデータストレージは中国 (北京) リージョンに配置されます。モデル推論用のコンピューティングリソースは中国本土内に限定されます。
以下のモデルを呼び出すには、中国 (北京) リージョンのAPI キーを使用してください。
Fun-ASR:fun-asr(安定版、現時点で fun-asr-2025-11-07 と同等)、fun-asr-2025-11-07(スナップショット)、fun-asr-2025-08-25(スナップショット)、fun-asr-mtl(安定版、現時点で fun-asr-mtl-2025-08-25 と同等)、fun-asr-mtl-2025-08-25(スナップショット)
Paraformer:paraformer-v2、paraformer-8k-v2
詳細については、「モデル一覧」をご参照ください。
モデル選択
シナリオ | 推奨モデル | 理由 |
中国語認識(会議/ライブ配信) | fun-asr | 中国語に高度に最適化されており、複数の方言をサポートします。ノイズ耐性と遠距離音声検出(VAD)機能により、騒がしい環境や複数の離れた話者のいる場面でも高精度を実現します。 |
多言語認識(国際会議) | fun-asr-mtl、paraformer-v2 | 単一モデルで複数言語を処理できるため、開発およびデプロイメントが簡素化されます。 |
エンターテインメントコンテンツ分析および字幕生成 | fun-asr | 独自の歌唱認識機能により、楽曲やライブ配信中の歌唱パートを効果的に文字起こしできます。また、強力なノイズ耐性により、複雑なメディア音声の処理に最適です。 |
ニュース/インタビュー番組の字幕生成 | fun-asr、paraformer-v2 | 句読点予測およびタイムスタンプ機能により、長尺音声から直接構造化された字幕を生成できます。 |
スマートハードウェア向け遠距離音声インタラクション | fun-asr | 最適化された遠距離 VAD 機能により、家庭や車内などの騒がしい環境でも、ユーザーのコマンドを正確にキャプチャして認識できます。 |
詳細については、「モデル機能比較」をご参照ください。
クイックスタート
以下の例は、API の呼び出し方法を示しています。
API キーを取得し、API キーを環境変数としてエクスポートします。SDK を使用して呼び出す場合は、DashScope SDK をインストールします。
Fun-ASR
ファイル文字起こし API は非同期でリクエストを処理します。これは、音声ファイルが大容量であることが多く、音声認識に時間がかかるためです。文字起こしタスクを送信した後、クエリ API を使用してタスク完了時に結果を取得します。
Python
from http import HTTPStatus
from dashscope.audio.asr import Transcription
from urllib import request
import dashscope
import os
import json
# The following URL is for the Singapore region. If you use a model in the Beijing region, replace the URL with https://dashscope.aliyuncs.com/api/v1.
dashscope.base_http_api_url = 'https://dashscope-intl.aliyuncs.com/api/v1'
# The API keys for the Singapore and Beijing regions are different. To get an API key, see https://www.alibabacloud.com/help/en/model-studio/get-api-key.
# If you have not configured the environment variable, replace the following line with your Model Studio API key: dashscope.api_key = "sk-xxx"
dashscope.api_key = os.getenv("DASHSCOPE_API_KEY")
task_response = Transcription.async_call(
model='fun-asr',
file_urls=['https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_female2.wav',
'https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_male2.wav'],
language_hints=['zh', 'en'] # language_hints is an optional parameter that specifies the language code of the audio to be recognized. For a list of valid values, see the API reference.
)
transcription_response = Transcription.wait(task=task_response.output.task_id)
if transcription_response.status_code == HTTPStatus.OK:
for transcription in transcription_response.output['results']:
if transcription['subtask_status'] == 'SUCCEEDED':
url = transcription['transcription_url']
result = json.loads(request.urlopen(url).read().decode('utf8'))
print(json.dumps(result, indent=4,
ensure_ascii=False))
else:
print('transcription failed!')
print(transcription)
else:
print('Error: ', transcription_response.output.message)Java
import com.alibaba.dashscope.audio.asr.transcription.*;
import com.alibaba.dashscope.utils.Constants;
import com.google.gson.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) {
// The following URL is for the Singapore region. If you use a model in the Beijing region, replace the URL with https://dashscope.aliyuncs.com/api/v1.
Constants.baseHttpApiUrl = "https://dashscope-intl.aliyuncs.com/api/v1";
// Create transcription parameters.
TranscriptionParam param =
TranscriptionParam.builder()
// The API keys for the Singapore and Beijing regions are different. To get an API key, see https://www.alibabacloud.com/help/en/model-studio/get-api-key.
// If you have not configured the environment variable, replace the following line with your Model Studio API key: .apiKey("sk-xxx")
.apiKey(System.getenv("DASHSCOPE_API_KEY"))
.model("fun-asr")
// language_hints is an optional parameter that specifies the language code of the audio to be recognized. For a list of valid values, see the API reference.
.parameter("language_hints", new String[]{"zh", "en"})
.fileUrls(
Arrays.asList(
"https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_female2.wav",
"https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_male2.wav"))
.build();
try {
Transcription transcription = new Transcription();
// Submit the transcription request.
TranscriptionResult result = transcription.asyncCall(param);
System.out.println("RequestId: " + result.getRequestId());
// Wait for the task to complete and get the result.
result = transcription.wait(
TranscriptionQueryParam.FromTranscriptionParam(param, result.getTaskId()));
// Get the transcription result.
List<TranscriptionTaskResult> taskResultList = result.getResults();
if (taskResultList != null && taskResultList.size() > 0) {
for (TranscriptionTaskResult taskResult : taskResultList) {
String transcriptionUrl = taskResult.getTranscriptionUrl();
HttpURLConnection connection =
(HttpURLConnection) new URL(transcriptionUrl).openConnection();
connection.setRequestMethod("GET");
connection.connect();
BufferedReader reader =
new BufferedReader(new InputStreamReader(connection.getInputStream()));
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JsonElement jsonResult = gson.fromJson(reader, JsonObject.class);
System.out.println(gson.toJson(jsonResult));
}
}
} catch (Exception e) {
System.out.println("error: " + e);
}
System.exit(0);
}
}Paraformer
ファイル文字起こし API は非同期でリクエストを処理します。これは、音声ファイルが大容量であることが多く、音声認識に時間がかかるためです。文字起こしタスクを送信した後、クエリ API を使用してタスク完了時に結果を取得します。
Python
from http import HTTPStatus
from dashscope.audio.asr import Transcription
from urllib import request
import dashscope
import os
import json
# The following URL is for the Beijing region. If you use a model in the Singapore region, replace the URL with https://dashscope-intl.aliyuncs.com/api/v1.
dashscope.base_http_api_url = 'https://dashscope.aliyuncs.com/api/v1'
# The API keys for the Singapore and Beijing regions are different. To get an API key, see https://www.alibabacloud.com/help/en/model-studio/get-api-key.
# If you have not configured the environment variable, replace the following line with your Model Studio API key: dashscope.api_key = "sk-xxx"
dashscope.api_key = os.getenv("DASHSCOPE_API_KEY")
task_response = Transcription.async_call(
model='paraformer-v2',
file_urls=['https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_female2.wav',
'https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_male2.wav'],
language_hints=['zh', 'en'] # language_hints is an optional parameter that specifies the language code of the audio to be recognized. This parameter is supported only by the paraformer-v2 model. For a list of valid values, see the API reference.
)
transcription_response = Transcription.wait(task=task_response.output.task_id)
if transcription_response.status_code == HTTPStatus.OK:
for transcription in transcription_response.output['results']:
if transcription['subtask_status'] == 'SUCCEEDED':
url = transcription['transcription_url']
result = json.loads(request.urlopen(url).read().decode('utf8'))
print(json.dumps(result, indent=4,
ensure_ascii=False))
else:
print('transcription failed!')
print(transcription)
else:
print('Error: ', transcription_response.output.message)Java
import com.alibaba.dashscope.audio.asr.transcription.*;
import com.alibaba.dashscope.utils.Constants;
import com.google.gson.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.List;
public class Main {
public static void main(String[] args) {
// The following URL is for the Beijing region. If you use a model in the Singapore region, replace the URL with https://dashscope-intl.aliyuncs.com/api/v1.
Constants.baseHttpApiUrl = "https://dashscope.aliyuncs.com/api/v1";
// Create transcription parameters.
TranscriptionParam param =
TranscriptionParam.builder()
// The API keys for the Singapore and Beijing regions are different. To get an API key, see https://www.alibabacloud.com/help/en/model-studio/get-api-key.
// If you have not configured the environment variable, replace the following line with your Model Studio API key: .apiKey("sk-xxx")
.apiKey(System.getenv("DASHSCOPE_API_KEY"))
.model("paraformer-v2")
// language_hints is an optional parameter that specifies the language code of the audio to be recognized. This parameter is supported only by the paraformer-v2 model. For a list of valid values, see the API reference.
.parameter("language_hints", new String[]{"zh", "en"})
.fileUrls(
Arrays.asList(
"https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_female2.wav",
"https://dashscope.oss-cn-beijing.aliyuncs.com/samples/audio/paraformer/hello_world_male2.wav"))
.build();
try {
Transcription transcription = new Transcription();
// Submit the transcription request.
TranscriptionResult result = transcription.asyncCall(param);
System.out.println("RequestId: " + result.getRequestId());
// Wait for the task to complete and get the result.
result = transcription.wait(
TranscriptionQueryParam.FromTranscriptionParam(param, result.getTaskId()));
// Get the transcription result.
List<TranscriptionTaskResult> taskResultList = result.getResults();
if (taskResultList != null && taskResultList.size() > 0) {
for (TranscriptionTaskResult taskResult : taskResultList) {
String transcriptionUrl = taskResult.getTranscriptionUrl();
HttpURLConnection connection =
(HttpURLConnection) new URL(transcriptionUrl).openConnection();
connection.setRequestMethod("GET");
connection.connect();
BufferedReader reader =
new BufferedReader(new InputStreamReader(connection.getInputStream()));
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JsonElement jsonResult = gson.fromJson(reader, JsonObject.class);
System.out.println(gson.toJson(jsonResult));
}
}
} catch (Exception e) {
System.out.println("error: " + e);
}
System.exit(0);
}
}API
機能比較
機能 | Fun-ASR | Paraformer |
言語 | モデルによって異なります。
| モデルによって異なります。
|
音声フォーマット | aac、amr、avi、flac、flv、m4a、mkv、mov、mp3、mp4、mpeg、ogg、opus、wav、webm、wma、wmv | aac、amr、avi、flac、flv、m4a、mkv、mov、mp3、mp4、mpeg、ogg、opus、wav、webm、wma、wmv |
サンプルレート | 任意 | モデルによって異なります。
|
音声チャンネル | 任意 | |
入力形式 | 1 回のリクエストにつき、最大 100 個の公開アクセス可能な音声ファイル URL を受け付けます。 | |
音声サイズ/持続時間 | 1 ファイルあたり最大 2 GB、最大 12 時間。 | |
感情認識 | ||
タイムスタンプ | デフォルトで有効です。 | デフォルトで無効ですが、有効化可能です。 |
句読点予測 | デフォルトで有効です。 | |
ホットワード | ||
逆テキスト正規化(ITN) | デフォルトで有効です。 | |
歌唱認識 | ||
ノイズ拒否 | デフォルトで有効です。 | |
禁止用語フィルタリング | デフォルトで「Alibaba Cloud Model Studio 禁止用語リスト」の単語をフィルタリングします。追加のコンテンツをフィルタリングするには、カスタム構成が必要です。 | |
話者分離 | デフォルトで無効ですが、有効化可能です。 | |
フィラー語フィルタリング | デフォルトで無効ですが、有効化可能です。 | |
音声アクティビティ検出(VAD) | デフォルトで有効です。 | |
レート制限(RPS) | ジョブ送信 API:10 タスククエリ API:20 | ジョブ送信 API:20 タスククエリ API:20 |
アクセス方法 | DashScope SDK(Java、Python)および RESTful API | |
料金 | 国際:0.000035 米ドル/秒 中国本土:0.000032 米ドル/秒 | 中国本土:0.000012 米ドル/秒 |
よくある質問
Q:認識精度を向上させるにはどうすればよいですか?
認識精度は、入力音声の品質から話される特定の語彙まで、いくつかの要因に依存します。最良の結果を得るために、以下の推奨事項に従ってください。
精度に影響を与える主な要因:
音声品質:高精度を得るには録音の明瞭さが重要です。マイクの品質、サンプルレート、環境ノイズのレベルが主な要因です。
話者の特性:ピッチ、話速、アクセント、方言の違いは認識を複雑にし、特に珍しい方言や強いアクセントの場合に影響します。
言語と語彙:複数言語の混在、専門的な技術用語、スラングの使用は認識を複雑にします。
コンテキスト:コンテキストが不足すると意味的曖昧性が生じ、モデルが正しい単語を選択することが難しくなります。
最適化のための推奨事項:
音声品質を向上させる:高性能マイクを使用し、推奨サンプルレートで録音します。環境ノイズやエコーを低減します。
話者に合わせてモデルを選択する:強いアクセントや特定の方言が含まれる音声の場合は、その方言をサポートするモデルを選択します。
十分なコンテキストを提供する:音声を非常に短いセグメントに分割しないでください。長いセグメントはより多くのコンテキストを提供し、モデルが曖昧性を解消するのに役立ちます。