

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Real-time 呼叫分析输出
<a name="tca-output-streaming"></a>

Real-time Call Analytics 记录以逐行格式按区段显示。它们包括类别事件、问题检测、情绪以及 PII 识别和编辑。类别事件允许您设置实时警报；有关更多信息，请参阅[为类别匹配创建实时警报](tca-start-stream.md#tca-create-alert-stream)。

为了提高准确性并根据您的用例进一步自定义您的转录（例如包括特定行业的术语），请在您的呼叫分析请求中添加[自定义词汇表](custom-vocabulary.md)或[自定义语言模型](custom-language-models.md)。要屏蔽、删除或标记不希望出现在转录结果中的单词（例如脏话），请添加[词汇表过滤](vocabulary-filtering.md)。

以下各节显示了实时呼叫分析转录的 JSON 输出示例。

## 类别事件
<a name="tca-output-category-event-stream"></a>

以下是转录输出中的类别匹配介绍。此示例显示从 19010 毫秒时间戳到 22690 毫秒时间戳的音频与“网络投诉”类别相匹配。在这种情况下，自定义的“网络投诉”类别要求客户提到“*网络问题*”（字词完全匹配）。

```
"CategoryEvent": { 
    "MatchedCategories": [ 
        "{{network-complaint}}" 
    ],
    "MatchedDetails": { 
        "{{network issues}}" : { 
            "TimestampRanges": [    
                { 
                    "BeginOffsetMillis": {{9299375}},
                    "EndOffsetMillis": {{7899375}}
                }
            ]
        }
    }
},
```

## 问题检测
<a name="tca-output-issue-detection-stream"></a>

以下是转录输出中的问题检测匹配介绍。此示例显示，从字符 26 到字符 62 的文本描述了一个问题。

```
"UtteranceEvent": {
    {{...}}
    "Transcript": "{{Wang Xiulan I'm tired of the network issues my phone is having.}}",
    {{...}}
    "IssuesDetected": [
        {
            "CharacterOffsets": {
                "BeginOffsetChar": {{26}},
                "EndOffsetChar": {{62}}
            }
        }
    ]
},
```

## 情绪
<a name="tca-output-sentiment-stream"></a>

以下是转录输出中的情绪分析介绍。

```
"UtteranceEvent": {    
    {{...}}
    "Sentiment": "{{NEGATIVE}}",
    "Items": [{
        {{...}}
```

## PII 识别
<a name="tca-output-pii-id-stream"></a>

以下是转录输出中 PII 识别介绍。

```
"Entities": [
    {
        "Content": "{{Wang Xiulan}}",
        "Category": "PII",
        "Type": "{{NAME}}",
        "BeginOffsetMillis": {{7999375}},
        "EndOffsetMillis": {{199375}},
        "Confidence": {{0.9989}}
    }
],
```

## PII 编辑
<a name="tca-output-pii-redact-stream"></a>

以下是转录输出中的 PII 编辑介绍。

```
"Content": "{{[NAME]. Hi, [NAME]. I'm [NAME] Happy to be helping you today.}}",
"Redaction": {
    "RedactedTimestamps": [
        {
            "BeginOffsetMillis": {{32670}},
            "EndOffsetMillis": {{33343}}
        }, 
        {
            "BeginOffsetMillis": {{33518}},
            "EndOffsetMillis": {{33858}}
        }, 
        {
            "BeginOffsetMillis": {{34068}},
            "EndOffsetMillis": {{34488}}
        }
    ]
},
```

## 语言识别
<a name="tca-output-language-id-stream"></a>

下面是语言识别在转录输出中的呈现形式。

```
{
  "LanguageCode": "en-US",
  "LanguageIdentification": [
    {
      "Code": "en-US",
      "Score": 0.823
    },
    {
      "Code": "de-DE",
      "Score": 0.177
    }
  ]
}
```

## 编译后的实时呼叫分析输出
<a name="tca-output-streaming-compiled"></a>

为简洁起见，在以下转录输出中，某些内容被替换为省略号。

```
{
    "CallAnalyticsTranscriptResultStream": {
        "BadRequestException": {},
        "ConflictException": {},
        "InternalFailureException": {},
        "LimitExceededException": {},
        "ServiceUnavailableException": {},
        "UtteranceEvent": {
            "UtteranceId": "58c27f92-7277-11ec-90d6-0242ac120003",
            "ParticipantRole": "CUSTOMER",
            "IsPartial": false,
            "Transcript": "Wang Xiulan I'm tired of the network issues my phone is having.",
            "BeginOffsetMillis": 19010,
            "EndOffsetMillis": 22690,
            "Sentiment": "NEGATIVE",
            "Items": [{
                    "Content": "Wang",
                    "BeginOffsetMillis": 379937,
                    "EndOffsetMillis": 299375,
                    "Type": "pronunciation",
                    "Confidence": 0.9961,
                    "VocabularyFilterMatch": false
                },
                {
                    "Content": "Xiulan",
                    "EndOffsetMillis": 5899375,
                    "BeginOffsetMillis": 3899375,
                    "Type": "pronunciation",
                    "Confidence": 0.9961,
                    "VocabularyFilterMatch": false
                },
                {{...}}
                {
                    "Content": "network",
                    "EndOffsetMillis": 199375,
                    "BeginOffsetMillis": 9299375,
                    "Type": "pronunciation",
                    "Confidence": 0.9961,
                    "VocabularyFilterMatch": false
                },
                {
                    "Content": "issues",
                    "EndOffsetMillis": 7899375,
                    "BeginOffsetMillis": 5999375,
                    "Type": "pronunciation",
                    "Confidence": 0.9961,
                    "VocabularyFilterMatch": false
                },
                {
                    "Content": "my",
                    "EndOffsetMillis": 9199375,
                    "BeginOffsetMillis": 7999375,
                    "Type": "pronunciation",
                    "Confidence": 0.9961,
                    "VocabularyFilterMatch": false
                },
                {
                    "Content": "phone",
                    "EndOffsetMillis": 199375,
                    "BeginOffsetMillis": 9299375,
                    "Type": "pronunciation",
                    "Confidence": 0.9961,
                    "VocabularyFilterMatch": false
                },
                {{...}}
            ],
            "Entities": [{
                "Content": "Wang Xiulan",
                "Category": "PII",
                "Type": "NAME",
                "BeginOffsetMillis": 7999375,
                "EndOffsetMillis": 199375,
                "Confidence": 0.9989
            }],
            "IssuesDetected": [{
                "CharacterOffsets": {
                    "BeginOffsetChar": 26,
                    "EndOffsetChar": 62
                }
            }],
            "LanguageCode": "en-US",
            "LanguageIdentification": [
                {
                    "Code": "en-US",
                    "Score": 0.823
                },
                {
                    "Code": "de-DE",
                    "Score": 0.177
                }
            ]
        },
        "CategoryEvent": { 
            "MatchedCategories": [ 
                "network-complaint" 
            ],
            "MatchedDetails": { 
                "network issues" : { 
                    "TimestampRanges": [    
                        { 
                            "BeginOffsetMillis": 9299375,
                            "EndOffsetMillis": 7899375
                        }
                    ]
                }
            }
        }
    }
}
```