

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# Transkribieren von Mehrkanal-Audio
<a name="channel-id"></a>

Wenn Ihr Audio über zwei Kanäle verfügt, können Sie die Kanalidentifikation verwenden, um die Sprache von jedem Kanal separat zu transkribieren. Amazon Transcribeunterstützt derzeit kein Audio mit mehr als zwei Kanälen.

In Ihrem Transkript sind die Kanäle mit den Bezeichnungen `ch_0` und `ch_1` versehen.

Zusätzlich zu den [standardmäßigen Transkriptionsabschnitten](how-input.md#how-it-works-output) (`transcripts` und `items`) enthalten Anfragen mit aktivierter Kanalidentifizierung einen Abschnitt `channel_labels`. Dieser Abschnitt enthält jede Äußerung oder jedes Satzzeichen, gruppiert nach Kanal, sowie die zugehörigen Kanalbezeichnungen, Zeitstempel und Konfidenzwert.

```
"channel_labels": {
    "channels": [
        {
            "channel_label": "ch_0",
            "items": [                                      
                {
                    "channel_label": "ch_0",
                    "start_time": "4.86",
                    "end_time": "5.01",
                    "alternatives": [
                        {
                            "confidence": "1.0",
                            "content": "I've"
                        }
                    ],
                    "type": "pronunciation"
                },
                ...               
            "channel_label": "ch_1",
            "items": [
                {
                    "channel_label": "ch_1",
                    "start_time": "8.5",
                    "end_time": "8.89",
                    "alternatives": [
                        {
                            "confidence": "1.0",
                            "content": "Sorry"
                        }
                    ],
                    "type": "pronunciation"
                },
                ...
            "number_of_channels": 2
        },
```

Wenn eine Person auf einem Kanal zur gleichen Zeit wie eine Person auf einem anderen Kanal spricht, überschneiden sich die Zeitstempel für jeden Kanal, während die Personen übereinander sprechen.

Ein vollständiges Beispieltranskript mit Kanalidentifikation finden Sie unter [Beispiel Kanalidentifikationsausgabe (Batch)](channel-id-output-batch.md).

## Verwendung der Kanalidentifizierung in einer Batch-Transkription
<a name="channel-id-batch"></a>

Um Kanäle in einer Batch-Transkription zu identifizieren, können Sie das **AWS-Managementkonsole**AWS CLI**AWSSDKs******, oder verwenden. Im Folgenden finden Sie Beispiele:

### AWS-Managementkonsole
<a name="channel-id-console-batch"></a>

1. Melden Sie sich an der [AWS-Managementkonsole](https://console.aws.amazon.com/transcribe/) an.

1. Wählen Sie im Navigationsbereich **Transkriptionsaufträge** und dann **Auftrag erstellen** (oben rechts). Dies öffnet die Seite **Auftragsdetails angeben**.  
![\[Amazon TranscribeKonsolenseite „Auftragsdetails angeben“. Im Bereich „Auftragseinstellungen“ können Sie einen Namen für Ihren Transkriptionsauftrag angeben, einen Modelltyp auswählen und Ihre Spracheinstellungen festlegen.\]](http://docs.aws.amazon.com/de_de/transcribe/latest/dg/images/console-batch-job-details-1.png)

1. Füllen Sie alle Felder aus, die Sie auf der Seite **Auftragsdetails angeben** möchten, und wählen Sie dann **Weiter**. Dadurch gelangen Sie zur Seite **Auftrag konfigurieren – *optional***.

   Wählen Sie im Bereich **Audioeinstellungen** die Option **Kanalidentifikation** (unter der Überschrift „Art der Audioidentifikation“).  
![\[Amazon TranscribeKonsolenseite „Job konfigurieren“. Im Bereich „Audioeinstellungen“ können Sie die Kanalidentifizierung aktivieren.\]](http://docs.aws.amazon.com/de_de/transcribe/latest/dg/images/channel-id-batch.png)

1. Wählen Sie **Auftrag erstellen**, um Ihren Transkriptionsauftrag auszuführen. 

### AWS CLI
<a name="channel-id-cli"></a>

In diesem Beispiel verwenden wir den [start-transcription-job](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/transcribe/start-transcription-job.html). Weitere Informationen finden Sie unter [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html).

```
aws transcribe start-transcription-job \
--region us-west-2 \
--transcription-job-name my-first-transcription-job \
--media MediaFileUri=s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac \
--output-bucket-name amzn-s3-demo-bucket \
--output-key my-output-files/ \
--language-code en-US \
--settings ChannelIdentification=true
```

Hier ist ein weiteres Beispiel mit dem [start-transcription-job](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/transcribe/start-transcription-job.html)Befehl und einem Anforderungstext, der die Kanalidentifikation für diesen Job ermöglicht.

```
aws transcribe start-transcription-job \
--region us-west-2 \
--cli-input-json file://my-first-transcription-job.json
```

Die Datei *my-first-transcription-job.json* enthält den folgenden Anfragetext.

```
{
    "TranscriptionJobName": "my-first-transcription-job",
    "Media": {
        "MediaFileUri": "s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac"
  },
    "OutputBucketName": "amzn-s3-demo-bucket",
    "OutputKey": "my-output-files/", 
    "LanguageCode": "en-US",
    "Settings": {
        "ChannelIdentification": true
    }
}
```

### AWS SDK für Python (Boto3)
<a name="channel-id-python-batch"></a>

In diesem Beispiel werden Kanäle mithilfe der AWS SDK für Python (Boto3) Methode [start\$1transcription\$1job](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/transcribe.html#TranscribeService.Client.start_transcription_job) identifiziert. Weitere Informationen finden Sie unter [StartTranscriptionJob](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html).

```
from __future__ import print_function
import time
import boto3
transcribe = boto3.client('transcribe', 'us-west-2')
job_name = "my-first-transcription-job"
job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac"
transcribe.start_transcription_job(
    TranscriptionJobName = job_name,
    Media = {
        'MediaFileUri': job_uri
    },
    OutputBucketName = 'amzn-s3-demo-bucket',
    OutputKey = 'my-output-files/', 
    LanguageCode = 'en-US', 
    Settings = {
        'ChannelIdentification':True
    }
)

while True:
    status = transcribe.get_transcription_job(TranscriptionJobName = job_name)
    if status['TranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
        break
    print("Not ready yet...")
    time.sleep(5)
print(status)
```

## Verwenden der Kanalidentifizierung in einer Streaming-Transkription
<a name="channel-id-stream"></a>

Um Kanäle in einer Streaming-Transkription zu identifizieren, können Sie **HTTP/2** oder verwenden **WebSockets**. Beispiele finden Sie im Folgenden:

### HTTP/2-Stream
<a name="channel-id-http2"></a>

In diesem Beispiel wird eine HTTP/2-Anfrage erstellt, die Kanäle in Ihrer Transkriptionsausgabe trennt. Weitere Informationen zur Verwendung von HTTP/2-Streaming mit Amazon Transcribe finden Sie unter. [Einrichten eines HTTP/2-Streams](streaming-setting-up.md#streaming-http2) Weitere Einzelheiten zu Parametern und Kopfzeilen, die speziell für Amazon Transcribe gelten, finden Sie unter [StartStreamTranscription](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html).

```
POST /stream-transcription HTTP/2
host: transcribestreaming.us-west-2.amazonaws.com
X-Amz-Target: com.amazonaws.transcribe.Transcribe.StartStreamTranscription
Content-Type: application/vnd.amazon.eventstream
X-Amz-Content-Sha256: string
X-Amz-Date: 20220208T235959Z
Authorization: AWS4-HMAC-SHA256 Credential=access-key/20220208/us-west-2/transcribe/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target;x-amz-security-token, Signature=string
x-amzn-transcribe-language-code: en-US
x-amzn-transcribe-media-encoding: flac
x-amzn-transcribe-sample-rate: 16000      
x-amzn-channel-identification: TRUE
transfer-encoding: chunked
```

Parameterdefinitionen finden Sie in der [API-Referenz.](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_Reference.html) Parameter, die allen AWS API-Operationen gemeinsam sind, sind im Abschnitt [Allgemeine Parameter](https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonParameters.html) aufgeführt.

### WebSocket streamen
<a name="channel-id-websocket"></a>

In diesem Beispiel wird eine vorzeichenbehaftete URL erstellt, die Kanäle in Ihrer Transkriptionsausgabe trennt. Für eine bessere Lesbarkeit werden Zeilenumbrüche hinzugefügt. Weitere Hinweise zur Verwendung von WebSocket Streams mit Amazon Transcribe finden Sie unter[Einen WebSocket Stream einrichten](streaming-setting-up.md#streaming-websocket). Weitere Einzelheiten zu den Parametern finden Sie unter [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html).

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/stream-transcription-websocket?
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request
&X-Amz-Date=20220208T235959Z
&X-Amz-Expires=300
&X-Amz-Security-Token=security-token
&X-Amz-Signature=string
&X-Amz-SignedHeaders=content-type%3Bhost%3Bx-amz-date
&language-code=en-US
&specialty=PRIMARYCARE
&type=DICTATION
&media-encoding=flac
&sample-rate=16000    
&channel-identification=TRUE
```

Parameterdefinitionen finden Sie in der [API-Referenz.](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_Reference.html) Parameter, die allen AWS API-Vorgängen gemeinsam sind, sind im Abschnitt [Allgemeine Parameter](https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonParameters.html) aufgeführt.

# Beispiel Kanalidentifikationsausgabe (Batch)
<a name="channel-id-output-batch"></a>

Hier ein Beispiel für die Ausgabe einer Batch-Transkription mit aktivierter Kanalidentifizierung.

```
{
    "jobName": "my-first-transcription-job",
    "accountId": "111122223333",
    "results": {
        "transcripts": [
            {
                "transcript": "I've been on hold for an hour. Sorry about that."
            }
        ],
        "channel_labels": {
            "channels": [
                {
                    "channel_label": "ch_0",
                    "items": [                                      
                        {
                            "channel_label": "ch_0",
                            "start_time": "4.86",
                            "end_time": "5.01",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "I've"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_0",
                            "start_time": "5.01",
                            "end_time": "5.16",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "been"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_0",
                            "start_time": "5.16",
                            "end_time": "5.28",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "on"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_0",
                            "start_time": "5.28",
                            "end_time": "5.62",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "hold"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_0",
                            "start_time": "5.62",
                            "end_time": "5.83",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "for"
                                }
                            ],
                            "type": "pronunciation"
                        },              
                        {
                            "channel_label": "ch_0",
                            "start_time": "6.1",
                            "end_time": "6.25",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "an"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_0",
                            "start_time": "6.25",
                            "end_time": "6.87",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "hour"
                                }
                            ],
                            "type": "pronunciation"
                        },                      
                        {
                            "channel_label": "ch_0",
                            "language_code": "en-US",
                            "alternatives": [
                                {
                                    "confidence": "0.0",
                                    "content": "."
                                }
                            ],
                            "type": "punctuation"
                        }                      
                    ]
                },
                {                
                "channel_label": "ch_1",
                    "items": [
                        {
                            "channel_label": "ch_1",
                            "start_time": "8.5",
                            "end_time": "8.89",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "Sorry"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_1",
                            "start_time": "8.89",
                            "end_time": "9.06",
                            "alternatives": [
                                {
                                    "confidence": "0.9176",
                                    "content": "about"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_1",
                            "start_time": "9.06",
                            "end_time": "9.25",
                            "alternatives": [
                                {
                                    "confidence": "1.0",
                                    "content": "that"
                                }
                            ],
                            "type": "pronunciation"
                        },
                        {
                            "channel_label": "ch_1",
                            "alternatives": [
                                {
                                    "confidence": "0.0",
                                    "content": "."
                                }
                            ],
                            "type": "punctuation"
                        }                     
                    ]
                }
            ],
            "number_of_channels": 2
        },
        "items": [            
            {
                "id": 0,
                "channel_label": "ch_0",
                "start_time": "4.86",
                "end_time": "5.01",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "I've"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 1,
                "channel_label": "ch_0",
                "start_time": "5.01",
                "end_time": "5.16",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "been"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 2,
                "channel_label": "ch_0",
                "start_time": "5.16",
                "end_time": "5.28",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "on"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 3,
                "channel_label": "ch_0",
                "start_time": "5.28",
                "end_time": "5.62",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "hold"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 4,
                "channel_label": "ch_0",
                "start_time": "5.62",
                "end_time": "5.83",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "for"
                    }
                ],
                "type": "pronunciation"
            },            
            {
                "id": 5,
                "channel_label": "ch_0",
                "start_time": "6.1",
                "end_time": "6.25",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "an"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 6,
                "channel_label": "ch_0",
                "start_time": "6.25",
                "end_time": "6.87",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "hour"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 7,
                "channel_label": "ch_0",
                "alternatives": [
                    {
                        "confidence": "0.0",
                        "content": "."
                    }
                ],
                "type": "punctuation"
            },
            {
                "id": 8,
                "channel_label": "ch_1",
                "start_time": "8.5",
                "end_time": "8.89",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "Sorry"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 9,
                "channel_label": "ch_1",
                "start_time": "8.89",
                "end_time": "9.06",
                "alternatives": [
                    {
                        "confidence": "0.9176",
                        "content": "about"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 10,
                "channel_label": "ch_1",
                "start_time": "9.06",
                "end_time": "9.25",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "that"
                    }
                ],
                "type": "pronunciation"
            },
            {
                "id": 11,
                "channel_label": "ch_1",
                "alternatives": [
                    {
                        "confidence": "0.0",
                        "content": "."
                    }
                ],
                "type": "punctuation"
            }
        ],
        "audio_segments": [
            {
                "id": 0,
                "transcript": "I've been on hold for an hour.",
                "start_time": "4.86",
                "end_time": "6.87",
                "channel_label": "ch_0",
                "items": [
                    0,
                    1,
                    2,
                    3,
                    4,
                    5,
                    6,
                    7
                ]
            },
            {
                "id": 1,
                "transcript": "Sorry about that.",
                "start_time": "8.5",
                "end_time": "9.25",
                "channel_label": "ch_1",
                "items": [
                    8,
                    9,
                    10,
                    11
                ]
            }
        ]
    },
    "status": "COMPLETED"
}
```