使用發音評定
在本文中,您將學習如何透過語音 SDK 使用語音轉換文字評估發音。 發音評定會評估語音發音,並向說話者提供關於說話音訊正確度和流暢度的意見反應。
使用串流模式的發音評估
發音評估支援不中斷的串流模式。 錄製時間可以透過語音 SDK 無限制。 只要您不停止錄製,評估程式就不會完成,而且您可以方便暫停和繼續評估。
作為基準,發音評定與語音轉換文字的使用成本相同,包括隨用隨付或承諾用量層價格。 如果您針對語音轉換文字購買承諾用量層,發音評定的費用會計入該承諾用量。 如需詳細資訊,請參閱定價。
如需了解如何在您自己的應用程式中以串流模式使用發音評定,請參閱範例程式碼。
如需了解如何在您自己的應用程式中以串流模式使用發音評定,請參閱範例程式碼。
如需了解如何在您自己的應用程式中以串流模式使用發音評定,請參閱範例程式碼。
如需了解如何在您自己的應用程式中以串流模式使用發音評定,請參閱範例程式碼。
如需了解如何在您自己的應用程式中以串流模式使用發音評定,請參閱範例程式碼。
如需了解如何在您自己的應用程式中以串流模式使用發音評定,請參閱範例程式碼。
如需了解如何在您自己的應用程式中以串流模式使用發音評定,請參閱範例程式碼。
設定組態參數
注意
語音 SDK for Go 無法使用發音評定。 您可以閱讀本指南中的概念。 請根據您的解決方案選取另一種程式設計語言。
在 SpeechRecognizer
中,您可以指定要學習或練習改善發音的語言。 預設地區設定為 en-US
。 若要了解如何在您自己的應用程式中指定發音評估的學習語言,請參閱範例程式碼。
提示
當語言有多個地區設定時,如果您不確定應使用為哪個地區設定,請分別嘗試每個地區設定。 例如,針對西班牙文,請嘗試 es-ES
和 es-MX
。 判斷哪個地區設定對於您的情境分數更高。
您必須建立 PronunciationAssessmentConfig
物件。 您可以設定 EnableProsodyAssessment
和 EnableContentAssessmentWithTopic
來啟用韻律和內容評量。 如需詳細資訊,請參閱設定方法。
var pronunciationAssessmentConfig = new PronunciationAssessmentConfig(
referenceText: "",
gradingSystem: GradingSystem.HundredMark,
granularity: Granularity.Phoneme,
enableMiscue: false);
pronunciationAssessmentConfig.EnableProsodyAssessment();
pronunciationAssessmentConfig.EnableContentAssessmentWithTopic("greeting");
auto pronunciationConfig = PronunciationAssessmentConfig::Create("", PronunciationAssessmentGradingSystem::HundredMark, PronunciationAssessmentGranularity::Phoneme, false);
pronunciationConfig->EnableProsodyAssessment();
pronunciationConfig->EnableContentAssessmentWithTopic("greeting");
PronunciationAssessmentConfig pronunciationConfig = new PronunciationAssessmentConfig("",
PronunciationAssessmentGradingSystem.HundredMark, PronunciationAssessmentGranularity.Phoneme, false);
pronunciationConfig.enableProsodyAssessment();
pronunciationConfig.enableContentAssessmentWithTopic("greeting");
pronunciation_config = speechsdk.PronunciationAssessmentConfig(
reference_text="",
grading_system=speechsdk.PronunciationAssessmentGradingSystem.HundredMark,
granularity=speechsdk.PronunciationAssessmentGranularity.Phoneme,
enable_miscue=False)
pronunciation_config.enable_prosody_assessment()
pronunciation_config.enable_content_assessment_with_topic("greeting")
var pronunciationAssessmentConfig = new sdk.PronunciationAssessmentConfig(
referenceText: "",
gradingSystem: sdk.PronunciationAssessmentGradingSystem.HundredMark,
granularity: sdk.PronunciationAssessmentGranularity.Phoneme,
enableMiscue: false);
pronunciationAssessmentConfig.enableProsodyAssessment();
pronunciationAssessmentConfig.enableContentAssessmentWithTopic("greeting");
SPXPronunciationAssessmentConfiguration *pronunicationConfig =
[[SPXPronunciationAssessmentConfiguration alloc] init:@"" gradingSystem:SPXPronunciationAssessmentGradingSystem_HundredMark granularity:SPXPronunciationAssessmentGranularity_Phoneme enableMiscue:false];
[pronunicationConfig enableProsodyAssessment];
[pronunicationConfig enableContentAssessmentWithTopic:@"greeting"];
let pronAssessmentConfig = try! SPXPronunciationAssessmentConfiguration("",
gradingSystem: .hundredMark,
granularity: .phoneme,
enableMiscue: false)
pronAssessmentConfig.enableProsodyAssessment()
pronAssessmentConfig.enableContentAssessment(withTopic: "greeting")
此表列出發音評定的部分主要設定參數。
參數 | 描述 |
---|---|
ReferenceText |
評估發音時所使用的文字。ReferenceText 是選用參數。 如果您想要針對閱讀語言學習案例執行具講稿的評量,請設定參考文字。 如果您想要執行無講稿的評量,請勿設定參考文字。關於具講稿與無講稿評量之間的價格差異,請參閱價格。 |
GradingSystem |
評分校正的計分系統。 FivePoint 提供 0-5 的浮點數分數。 HundredMark 提供 0-100 的浮點數分數。 預設值:FivePoint 。 |
Granularity |
判斷評估資料細微性的最低層級。 大於或等於最小值的層級分數會傳回。 接受的值為 Phoneme ,其顯示全文、文字、音節和音素層級的分數;Word ,顯示全文和文字層級的分數,或是 FullText ,此值只顯示全文層級的分數。 提供的完整參考文字可以是字組、句子或段落, 具體取決於您的輸入參考文字。 預設值:Phoneme 。 |
EnableMiscue |
比較發音的字組和參考文字時,會計算失誤。 啟用誤讀是選擇性功能。 如果這個值為 True ,則 ErrorType 結果值可以根據比較設定為 Omission 或 Insertion 。 值為 False 和 True 。 預設值:False 。 若要啟用錯誤計算,請將 EnableMiscue 設為 True 。 您可以參考上方資料表的程式碼片段。 |
ScenarioId |
自訂點系統的 GUID。 |
設定方法
下表列出您可以為 PronunciationAssessmentConfig
物件設定的一些選擇性方法。
方法 | 描述 |
---|---|
EnableProsodyAssessment |
為您的發音評估啟用韻律評量。 此功能會評估重音、語調、語速和節奏等層面。 這項功能可讓您深入了解語音的自然性和表現性。 啟用韻律評量為選擇性項目。 如果呼叫這個方法, ProsodyScore 會傳回結果值。 |
EnableContentAssessmentWithTopic |
啟用內容評量。 內容評量是語言學習案例無腳本評估的一部分。 藉由提供描述,您可以增強評量對所講述特定主題的理解程度。 例如,在 C# 中呼叫 pronunciationAssessmentConfig.EnableContentAssessmentWithTopic("greeting"); 。 您可以將「greeting」取代為描述主題的任意文字。 描述沒有長度限制,目前僅支援 en-US 地區設定。 |
取得發音評定結果
辨識語音時,您可以要求將發音評定結果以 SDK 物件或 JSON 字串來呈現。
using (var speechRecognizer = new SpeechRecognizer(
speechConfig,
audioConfig))
{
pronunciationAssessmentConfig.ApplyTo(speechRecognizer);
var speechRecognitionResult = await speechRecognizer.RecognizeOnceAsync();
// The pronunciation assessment result as a Speech SDK object
var pronunciationAssessmentResult =
PronunciationAssessmentResult.FromResult(speechRecognitionResult);
// The pronunciation assessment result as a JSON string
var pronunciationAssessmentResultJson = speechRecognitionResult.Properties.GetProperty(PropertyId.SpeechServiceResponse_JsonResult);
}
SDK 物件若搭配適用於 C++ 的語音 SDK,則無法取得字組、音節和音素的結果。 字組、音節和音素結果只能在 JSON 字串中使用。
auto speechRecognizer = SpeechRecognizer::FromConfig(
speechConfig,
audioConfig);
pronunciationAssessmentConfig->ApplyTo(speechRecognizer);
speechRecognitionResult = speechRecognizer->RecognizeOnceAsync().get();
// The pronunciation assessment result as a Speech SDK object
auto pronunciationAssessmentResult =
PronunciationAssessmentResult::FromResult(speechRecognitionResult);
// The pronunciation assessment result as a JSON string
auto pronunciationAssessmentResultJson = speechRecognitionResult->Properties.GetProperty(PropertyId::SpeechServiceResponse_JsonResult);
若要了解如何在您自己的應用程式中指定發音評估的學習語言,請參閱範例程式碼。
針對 Android 應用程式開發,可使用 SDK 物件搭配適用於 Java 的語音 SDK 來取得字組、音節和音素結果。 結果也可以在 JSON 字串中取得。 針對 JAVA Runtime (JRE) 應用程式開發,字組、音節和音素結果只能在 JSON 字串中取得。
SpeechRecognizer speechRecognizer = new SpeechRecognizer(
speechConfig,
audioConfig);
pronunciationAssessmentConfig.applyTo(speechRecognizer);
Future<SpeechRecognitionResult> future = speechRecognizer.recognizeOnceAsync();
SpeechRecognitionResult speechRecognitionResult = future.get(30, TimeUnit.SECONDS);
// The pronunciation assessment result as a Speech SDK object
PronunciationAssessmentResult pronunciationAssessmentResult =
PronunciationAssessmentResult.fromResult(speechRecognitionResult);
// The pronunciation assessment result as a JSON string
String pronunciationAssessmentResultJson = speechRecognitionResult.getProperties().getProperty(PropertyId.SpeechServiceResponse_JsonResult);
recognizer.close();
speechConfig.close();
audioConfig.close();
pronunciationAssessmentConfig.close();
speechRecognitionResult.close();
var speechRecognizer = SpeechSDK.SpeechRecognizer.FromConfig(speechConfig, audioConfig);
pronunciationAssessmentConfig.applyTo(speechRecognizer);
speechRecognizer.recognizeOnceAsync((speechRecognitionResult: SpeechSDK.SpeechRecognitionResult) => {
// The pronunciation assessment result as a Speech SDK object
var pronunciationAssessmentResult = SpeechSDK.PronunciationAssessmentResult.fromResult(speechRecognitionResult);
// The pronunciation assessment result as a JSON string
var pronunciationAssessmentResultJson = speechRecognitionResult.properties.getProperty(SpeechSDK.PropertyId.SpeechServiceResponse_JsonResult);
},
{});
若要了解如何在您自己的應用程式中指定發音評估的學習語言,請參閱範例程式碼。
speech_recognizer = speechsdk.SpeechRecognizer(
speech_config=speech_config, \
audio_config=audio_config)
pronunciation_assessment_config.apply_to(speech_recognizer)
speech_recognition_result = speech_recognizer.recognize_once()
# The pronunciation assessment result as a Speech SDK object
pronunciation_assessment_result = speechsdk.PronunciationAssessmentResult(speech_recognition_result)
# The pronunciation assessment result as a JSON string
pronunciation_assessment_result_json = speech_recognition_result.properties.get(speechsdk.PropertyId.SpeechServiceResponse_JsonResult)
若要了解如何在您自己的應用程式中指定發音評估的學習語言,請參閱範例程式碼。
SPXSpeechRecognizer* speechRecognizer = \
[[SPXSpeechRecognizer alloc] initWithSpeechConfiguration:speechConfig
audioConfiguration:audioConfig];
[pronunciationAssessmentConfig applyToRecognizer:speechRecognizer];
SPXSpeechRecognitionResult *speechRecognitionResult = [speechRecognizer recognizeOnce];
// The pronunciation assessment result as a Speech SDK object
SPXPronunciationAssessmentResult* pronunciationAssessmentResult = [[SPXPronunciationAssessmentResult alloc] init:speechRecognitionResult];
// The pronunciation assessment result as a JSON string
NSString* pronunciationAssessmentResultJson = [speechRecognitionResult.properties getPropertyByName:SPXSpeechServiceResponseJsonResult];
若要了解如何在您自己的應用程式中指定發音評估的學習語言,請參閱範例程式碼。
let speechRecognizer = try! SPXSpeechRecognizer(speechConfiguration: speechConfig, audioConfiguration: audioConfig)
try! pronConfig.apply(to: speechRecognizer)
let speechRecognitionResult = try? speechRecognizer.recognizeOnce()
// The pronunciation assessment result as a Speech SDK object
let pronunciationAssessmentResult = SPXPronunciationAssessmentResult(speechRecognitionResult!)
// The pronunciation assessment result as a JSON string
let pronunciationAssessmentResultJson = speechRecognitionResult!.properties?.getPropertyBy(SPXPropertyId.speechServiceResponseJsonResult)
結果參數
根據採用具講稿或無講稿評量,您可能會取得不同的發音評量結果。 具講稿評量適用於閱讀語言學習案例。 無講稿評量適用於語言學習案例。
注意
關於具講稿與無講稿評量之間的價格差異,請參閱價格。
具講稿評量結果
下表列出具講稿評量或閱讀案例的一些關鍵發音評量結果。
參數 | 描述 | 資料粒度 |
---|---|---|
AccuracyScore |
語音的發音精確度。 精確度表示音素與母語人士發音的相符程度。 音節、字組和全文的精確度分數是音素等級精確度分數的彙總,並使用評量目標進行精簡。 | 音素層級、 音節層級 (僅限 en-US)、 字組層級、 全文層級 |
FluencyScore |
指定語音的流暢度。 流暢度指出語音與母語人士在字組間停頓的相符程度。 | 全文層級 |
CompletenessScore |
語音的完整性,按輸入參考文字的發音字組比例計算。 | 全文層級 |
ProsodyScore |
指定語音的韻律。 韻律表示指定語音的自然度,包括重音、語調、語速和節奏。 | 全文層級 |
PronScore |
指定語音發音品質的整體分數。 PronScore 是根據 AccuracyScore 、FluencyScore 、CompletenessScore 和 ProsodyScore 加權計算得出,前提是可取得 ProsodyScore 和 CompletenessScore 。 如果其中一個無法使用,則 PronScore 不會考慮該分數。 |
全文層級 |
ErrorType |
這個值表示相較於參考文字的錯誤類型。 選項包括字詞是否遭省略、插入或斷字不正確, 也會表示標點符號處的斷字遺漏。 該值還會也指出一個字組是否發音不佳,或是語句為單調地上升、下降或平穩。 可能的值為 None (表示這個字沒有錯誤)、Omission 、Insertion 、Mispronunciation 、UnexpectedBreak 、MissingBreak 和 Monotone 。 當某個字組的發音 Mispronunciation 低於 60 時,錯誤類型可能是 AccuracyScore 。 |
字組層級 |
無講稿評量結果
下表列出無講稿評量或語音案例的一些關鍵發音評量結果。
VocabularyScore
、GrammarScore
和 TopicScore
參數會彙總至合併的內容評量。
注意
內容和韻律評量僅適用於 en-US 地區設定。
回應參數 | 描述 | 資料粒度 |
---|---|---|
AccuracyScore |
語音的發音精確度。 精確度表示音素與母語人士發音的相符程度。 音節、字組和全文的精確度分數是音素等級精確度分數的彙總,並使用評量目標進行精簡。 | 音素層級、 音節層級 (僅限 en-US)、 字組層級、 全文層級 |
FluencyScore |
指定語音的流暢度。 流暢度指出語音與母語人士在字組間停頓的相符程度。 | 全文層級 |
ProsodyScore |
指定語音的韻律。 韻律表示指定語音的自然度,包括重音、語調、語速和節奏。 | 全文層級 |
VocabularyScore |
語彙運用的熟練程度。 評估說話者對單字的有效使用及其在指定內容中準確表達想法的適當性,以及語彙的複雜程度。 | 全文層級 |
GrammarScore |
使用文法和各種句式的正確性。 語彙精確度、文法精確度和句型結構的多樣性將共同提升文法錯誤辨識能力。 | 全文層級 |
TopicScore |
對於主題的理解和參與程度,可深入解析演講者有效表達想法和靈感的能力,以及對主題的參與度。 | 全文層級 |
PronScore |
指定語音發音品質的整體分數。 PronScore 是根據 AccuracyScore 、FluencyScore 和 ProsodyScore 加權計算得出,前提是可取得 ProsodyScore 。 如果 ProsodyScore 無法使用,則 PronScore 不會考慮該分數。 |
全文層級 |
ErrorType |
字組的發音不佳、不正確地插入斷句,或在標點符號時遺漏斷句。 該值還會也指出一個字組的語句是否為單調地上升、下降或平穩。 可能的值為 None (表示這個字沒有錯誤)、Mispronunciation 、UnexpectedBreak 、MissingBreak 和 Monotone 。 |
字組層級 |
下表更詳細地說明韻律評量結果:
欄位 | 描述 |
---|---|
ProsodyScore |
整個語句的韻律分數。 |
Feedback |
字組層級的意見反應,包括 Break 和 Intonation 。 |
Break |
|
ErrorTypes |
斷句相關的錯誤類型,包括 UnexpectedBreak 和 MissingBreak 。 目前的版本不提供斷句錯誤類型。 您必須設定欄位 UnexpectedBreak – Confidence 和 MissingBreak – confidence 的閾值,並決定在字組前面是否有非預期的斷句或遺漏斷句。 |
UnexpectedBreak |
表示字組前有非預期的斷句。 |
MissingBreak |
表示字組前遺漏斷句。 |
Thresholds |
這兩個信賴度分數的建議閾值為 0.75。 這表示,如果 UnexpectedBreak – Confidence 的值大於 0.75 就代表有非預期的斷句。 如果 MissingBreak – confidence 的值大於 0.75,則代表有遺漏的斷句。 雖然 0.75 是我們建議的值,但最好根據您自身的案例調整閾值。 如果您希望這兩種斷句情況有不同的偵測敏感度,可以為 UnexpectedBreak - Confidence 和 MissingBreak - Confidence 欄位指派不同的閾值。 |
Intonation |
表示語音中的語調。 |
ErrorTypes |
語調相關的錯誤類型,目前僅支援 Monotone (單調)。 如果 ErrorTypes 欄位中存在 Monotone ,則會將語句判斷為單調。 單調會以整個語句為單位偵測,但標籤會指派給所有字組。 相同語句中的所有字組都會共用相同的單調偵測資訊。 |
Monotone |
表示單調的語音。 |
Thresholds (Monotone Confidence) |
欄位 Monotone - SyllablePitchDeltaConfidence 保留用於使用者自訂的單調偵測。 如果您對提供的單調判斷不滿意,請調整這些欄位的閾值,根據您的喜好設定來自訂偵測。 |
JSON 結果範例
針對口語字組「hello」的具講稿發音評量結果如下列範例中的 JSON 字串所示。
- 音素字母是 IPA。
- 同一個字組的音節會與音素一起傳回。
- 您可以使用
Offset
和Duration
值,將音節與相對應的音素對齊。 例如,第二個音節l
的起始位移 (11700000) 與第三個因素loʊ
對齊。 位移代表所辨識語音在音訊串流中開始的時間。 此值會以 100 奈秒為單位進行測量。 若要深入了解Offset
和Duration
,請參閱回應屬性。 - 有五個
NBestPhonemes
對應到所要求的口語音素編號。 - 在
Phonemes
之中,最有可能的口語音素是ə
,而非預期的音素ɛ
。 預期的音素ɛ
只收到 47 分的信賴分數。 其他可能相符的音素則收到 52 分、17 分和 2 分的信賴分數。
{
"Id": "bbb42ea51bdb46d19a1d685e635fe173",
"RecognitionStatus": 0,
"Offset": 7500000,
"Duration": 13800000,
"DisplayText": "Hello.",
"NBest": [
{
"Confidence": 0.975003,
"Lexical": "hello",
"ITN": "hello",
"MaskedITN": "hello",
"Display": "Hello.",
"PronunciationAssessment": {
"AccuracyScore": 100,
"FluencyScore": 100,
"CompletenessScore": 100,
"PronScore": 100
},
"Words": [
{
"Word": "hello",
"Offset": 7500000,
"Duration": 13800000,
"PronunciationAssessment": {
"AccuracyScore": 99.0,
"ErrorType": "None"
},
"Syllables": [
{
"Syllable": "hɛ",
"PronunciationAssessment": {
"AccuracyScore": 91.0
},
"Offset": 7500000,
"Duration": 4100000
},
{
"Syllable": "loʊ",
"PronunciationAssessment": {
"AccuracyScore": 100.0
},
"Offset": 11700000,
"Duration": 9600000
}
],
"Phonemes": [
{
"Phoneme": "h",
"PronunciationAssessment": {
"AccuracyScore": 98.0,
"NBestPhonemes": [
{
"Phoneme": "h",
"Score": 100.0
},
{
"Phoneme": "oʊ",
"Score": 52.0
},
{
"Phoneme": "ə",
"Score": 35.0
},
{
"Phoneme": "k",
"Score": 23.0
},
{
"Phoneme": "æ",
"Score": 20.0
}
]
},
"Offset": 7500000,
"Duration": 3500000
},
{
"Phoneme": "ɛ",
"PronunciationAssessment": {
"AccuracyScore": 47.0,
"NBestPhonemes": [
{
"Phoneme": "ə",
"Score": 100.0
},
{
"Phoneme": "l",
"Score": 52.0
},
{
"Phoneme": "ɛ",
"Score": 47.0
},
{
"Phoneme": "h",
"Score": 17.0
},
{
"Phoneme": "æ",
"Score": 2.0
}
]
},
"Offset": 11100000,
"Duration": 500000
},
{
"Phoneme": "l",
"PronunciationAssessment": {
"AccuracyScore": 100.0,
"NBestPhonemes": [
{
"Phoneme": "l",
"Score": 100.0
},
{
"Phoneme": "oʊ",
"Score": 46.0
},
{
"Phoneme": "ə",
"Score": 5.0
},
{
"Phoneme": "ɛ",
"Score": 3.0
},
{
"Phoneme": "u",
"Score": 1.0
}
]
},
"Offset": 11700000,
"Duration": 1100000
},
{
"Phoneme": "oʊ",
"PronunciationAssessment": {
"AccuracyScore": 100.0,
"NBestPhonemes": [
{
"Phoneme": "oʊ",
"Score": 100.0
},
{
"Phoneme": "d",
"Score": 29.0
},
{
"Phoneme": "t",
"Score": 24.0
},
{
"Phoneme": "n",
"Score": 22.0
},
{
"Phoneme": "l",
"Score": 18.0
}
]
},
"Offset": 12900000,
"Duration": 8400000
}
]
}
]
}
]
}
您可以取得下列項目的發音評定分數:
每個地區設定支援的功能
下表摘要說明地區設定支援的功能。 如需更多具體資訊,請參閱下列各節。 如果您所需的地區設定未列在下列支援功能表格中,請填寫此輸入表單以取得進一步的協助。
音素字母 | IPA | SAPI |
---|---|---|
音素名稱 | en-US |
en-US , zh-CN |
音節群組 | en-US |
en-US |
口語音素 | en-US |
en-US |
音節群組
發音評定可以提供音節層級的評量結果。 字組通常是按照音節發音,而不是依音素來發音。 音節的分組更清晰易讀,且與說話習慣一致。
發音評量僅支援在 en-US
使用 IPA 和 SAPI 的音節群組。
下表比較範例音素與對應的音節。
範例字組 | 音素 | 音節 |
---|---|---|
technological | teknələdʒɪkl | tek·nə·lɑ·dʒɪkl |
hello | hɛloʊ | hɛ·loʊ |
luck | lʌk | lʌk |
photosynthesis | foʊtəsɪnθəsɪs | foʊ·tə·sɪn·θə·sɪs |
若要要求音節層級的結果以及音素,請將資料細微性設定參數設為 Phoneme
。
音素字母格式
發音評估支援在 en-US
使用 IPA 以及在 en-US
和 zh-CN
使用 SAPI 的音素名稱。
若是支援音素名稱的地區設定,則音素名稱會與分數一起提供。 音素名稱有助於識別哪些音素的發音準確或不正確。 針對其他地區設定,您只能取得音素分數。
下表比較範例 SAPI 音素與對應的 IPA 音素。
範例字組 | SAPI 音素 | IPA 音素 |
---|---|---|
hello | h eh l ow | h ɛ l oʊ |
luck | l ah k | l ʌ k |
photosynthesis | f ow t ax s ih n th ax s ih s | f oʊ t ə s ɪ n θ ə s ɪ s |
若要要求 IPA 音素,請將音素字母設定為 IPA
。 如果您未指定字母,則音素預設為 SAPI 格式。
pronunciationAssessmentConfig.PhonemeAlphabet = "IPA";
auto pronunciationAssessmentConfig = PronunciationAssessmentConfig::CreateFromJson("{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\"}");
PronunciationAssessmentConfig pronunciationAssessmentConfig = PronunciationAssessmentConfig.fromJson("{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\"}");
pronunciation_assessment_config = speechsdk.PronunciationAssessmentConfig(json_string="{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\"}")
var pronunciationAssessmentConfig = SpeechSDK.PronunciationAssessmentConfig.fromJSON("{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\"}");
pronunciationAssessmentConfig.phonemeAlphabet = @"IPA";
pronunciationAssessmentConfig?.phonemeAlphabet = "IPA"
評量口語音素
透過口語音素,您可以取得信賴度分數,指出口語音素符合預期音素的可能性。
發音評估支援在 en-US
使用 IPA 和 SAPI 的口語音素。
例如,若要取得 Hello
一字的完整口語音效,您可以串連每個預期音素的第一個語音語音,且信賴分數最高。 在下列的評量結果,當您說出 hello
一字時,預期的 IPA 音素為 h ɛ l oʊ
。 不過,實際的口語音素是 h ə l oʊ
。 在此範例中,您有五個可能候選項目適用於每個預期的音素。 此評定結果顯示,最可能的口語音素是 ə
而非預期的音素 ɛ
。 預期的音素 ɛ
只收到 47 分的信賴分數。 其他可能相符的音素則收到 52 分、17 分和 2 分的信賴分數。
{
"Id": "bbb42ea51bdb46d19a1d685e635fe173",
"RecognitionStatus": 0,
"Offset": 7500000,
"Duration": 13800000,
"DisplayText": "Hello.",
"NBest": [
{
"Confidence": 0.975003,
"Lexical": "hello",
"ITN": "hello",
"MaskedITN": "hello",
"Display": "Hello.",
"PronunciationAssessment": {
"AccuracyScore": 100,
"FluencyScore": 100,
"CompletenessScore": 100,
"PronScore": 100
},
"Words": [
{
"Word": "hello",
"Offset": 7500000,
"Duration": 13800000,
"PronunciationAssessment": {
"AccuracyScore": 99.0,
"ErrorType": "None"
},
"Syllables": [
{
"Syllable": "hɛ",
"PronunciationAssessment": {
"AccuracyScore": 91.0
},
"Offset": 7500000,
"Duration": 4100000
},
{
"Syllable": "loʊ",
"PronunciationAssessment": {
"AccuracyScore": 100.0
},
"Offset": 11700000,
"Duration": 9600000
}
],
"Phonemes": [
{
"Phoneme": "h",
"PronunciationAssessment": {
"AccuracyScore": 98.0,
"NBestPhonemes": [
{
"Phoneme": "h",
"Score": 100.0
},
{
"Phoneme": "oʊ",
"Score": 52.0
},
{
"Phoneme": "ə",
"Score": 35.0
},
{
"Phoneme": "k",
"Score": 23.0
},
{
"Phoneme": "æ",
"Score": 20.0
}
]
},
"Offset": 7500000,
"Duration": 3500000
},
{
"Phoneme": "ɛ",
"PronunciationAssessment": {
"AccuracyScore": 47.0,
"NBestPhonemes": [
{
"Phoneme": "ə",
"Score": 100.0
},
{
"Phoneme": "l",
"Score": 52.0
},
{
"Phoneme": "ɛ",
"Score": 47.0
},
{
"Phoneme": "h",
"Score": 17.0
},
{
"Phoneme": "æ",
"Score": 2.0
}
]
},
"Offset": 11100000,
"Duration": 500000
},
{
"Phoneme": "l",
"PronunciationAssessment": {
"AccuracyScore": 100.0,
"NBestPhonemes": [
{
"Phoneme": "l",
"Score": 100.0
},
{
"Phoneme": "oʊ",
"Score": 46.0
},
{
"Phoneme": "ə",
"Score": 5.0
},
{
"Phoneme": "ɛ",
"Score": 3.0
},
{
"Phoneme": "u",
"Score": 1.0
}
]
},
"Offset": 11700000,
"Duration": 1100000
},
{
"Phoneme": "oʊ",
"PronunciationAssessment": {
"AccuracyScore": 100.0,
"NBestPhonemes": [
{
"Phoneme": "oʊ",
"Score": 100.0
},
{
"Phoneme": "d",
"Score": 29.0
},
{
"Phoneme": "t",
"Score": 24.0
},
{
"Phoneme": "n",
"Score": 22.0
},
{
"Phoneme": "l",
"Score": 18.0
}
]
},
"Offset": 12900000,
"Duration": 8400000
}
]
}
]
}
]
}
若要指出是否要取得信賴分數,以及要取得信賴分數的可能口語音素數目,請將 NBestPhonemeCount
參數設為整數值,例如 5
。
pronunciationAssessmentConfig.NBestPhonemeCount = 5;
auto pronunciationAssessmentConfig = PronunciationAssessmentConfig::CreateFromJson("{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\",\"nBestPhonemeCount\":5}");
PronunciationAssessmentConfig pronunciationAssessmentConfig = PronunciationAssessmentConfig.fromJson("{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\",\"nBestPhonemeCount\":5}");
pronunciation_assessment_config = speechsdk.PronunciationAssessmentConfig(json_string="{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\",\"nBestPhonemeCount\":5}")
var pronunciationAssessmentConfig = SpeechSDK.PronunciationAssessmentConfig.fromJSON("{\"referenceText\":\"good morning\",\"gradingSystem\":\"HundredMark\",\"granularity\":\"Phoneme\",\"phonemeAlphabet\":\"IPA\",\"nBestPhonemeCount\":5}");
pronunciationAssessmentConfig.nbestPhonemeCount = 5;
pronunciationAssessmentConfig?.nbestPhonemeCount = 5
相關內容
- 深入了解品質基準。
- 嘗試在 Studio 中評估發音。
- 查看輕鬆部署發音評量的示範。
- 觀看發音評量的影片示範。