:doc:`ChimeSDKMediaPipelines <../../chime-sdk-media-pipelines>` / Client / create_media_insights_pipeline

******************************
create_media_insights_pipeline
******************************



.. py:method:: ChimeSDKMediaPipelines.Client.create_media_insights_pipeline(**kwargs)

  

  Creates a media insights pipeline.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/chime-sdk-media-pipelines-2021-07-15/CreateMediaInsightsPipeline>`_  


  **Request Syntax**
  ::

    response = client.create_media_insights_pipeline(
        MediaInsightsPipelineConfigurationArn='string',
        KinesisVideoStreamSourceRuntimeConfiguration={
            'Streams': [
                {
                    'StreamArn': 'string',
                    'FragmentNumber': 'string',
                    'StreamChannelDefinition': {
                        'NumberOfChannels': 123,
                        'ChannelDefinitions': [
                            {
                                'ChannelId': 123,
                                'ParticipantRole': 'AGENT'|'CUSTOMER'
                            },
                        ]
                    }
                },
            ],
            'MediaEncoding': 'pcm',
            'MediaSampleRate': 123
        },
        MediaInsightsRuntimeMetadata={
            'string': 'string'
        },
        KinesisVideoStreamRecordingSourceRuntimeConfiguration={
            'Streams': [
                {
                    'StreamArn': 'string'
                },
            ],
            'FragmentSelector': {
                'FragmentSelectorType': 'ProducerTimestamp'|'ServerTimestamp',
                'TimestampRange': {
                    'StartTimestamp': datetime(2015, 1, 1),
                    'EndTimestamp': datetime(2015, 1, 1)
                }
            }
        },
        S3RecordingSinkRuntimeConfiguration={
            'Destination': 'string',
            'RecordingFileFormat': 'Wav'|'Opus'
        },
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        ClientRequestToken='string'
    )
    
  :type MediaInsightsPipelineConfigurationArn: string
  :param MediaInsightsPipelineConfigurationArn: **[REQUIRED]** 

    The ARN of the pipeline's configuration.

    

  
  :type KinesisVideoStreamSourceRuntimeConfiguration: dict
  :param KinesisVideoStreamSourceRuntimeConfiguration: 

    The runtime configuration for the Kinesis video stream source of the media insights pipeline.

    

  
    - **Streams** *(list) --* **[REQUIRED]** 

      The streams in the source runtime configuration of a Kinesis video stream.

      

    
      - *(dict) --* 

        The configuration settings for a stream.

        

      
        - **StreamArn** *(string) --* **[REQUIRED]** 

          The ARN of the stream.

          

        
        - **FragmentNumber** *(string) --* 

          The unique identifier of the fragment to begin processing.

          

        
        - **StreamChannelDefinition** *(dict) --* **[REQUIRED]** 

          The streaming channel definition in the stream configuration.

          

        
          - **NumberOfChannels** *(integer) --* **[REQUIRED]** 

            The number of channels in a streaming channel.

            

          
          - **ChannelDefinitions** *(list) --* 

            The definitions of the channels in a streaming channel.

            

          
            - *(dict) --* 

              Defines an audio channel in a Kinesis video stream.

              

            
              - **ChannelId** *(integer) --* **[REQUIRED]** 

                The channel ID.

                

              
              - **ParticipantRole** *(string) --* 

                Specifies whether the audio in a channel belongs to the ``AGENT`` or ``CUSTOMER``.

                

              
            
        
        
      
  
    - **MediaEncoding** *(string) --* **[REQUIRED]** 

      Specifies the encoding of your input audio. Supported format: PCM (only signed 16-bit little-endian audio formats, which does not include WAV)

       

      For more information, see `Media formats <https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio>`__ in the *Amazon Transcribe Developer Guide*.

      

    
    - **MediaSampleRate** *(integer) --* **[REQUIRED]** 

      The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.

       

      Valid Range: Minimum value of 8000. Maximum value of 48000.

      

    
  
  :type MediaInsightsRuntimeMetadata: dict
  :param MediaInsightsRuntimeMetadata: 

    The runtime metadata for the media insights pipeline. Consists of a key-value map of strings.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  :type KinesisVideoStreamRecordingSourceRuntimeConfiguration: dict
  :param KinesisVideoStreamRecordingSourceRuntimeConfiguration: 

    The runtime configuration for the Kinesis video recording stream source.

    

  
    - **Streams** *(list) --* **[REQUIRED]** 

      The stream or streams to be recorded.

      

    
      - *(dict) --* 

        A structure that holds the settings for recording media.

        

      
        - **StreamArn** *(string) --* 

          The ARN of the recording stream.

          

        
      
  
    - **FragmentSelector** *(dict) --* **[REQUIRED]** 

      Describes the timestamp range and timestamp origin of a range of fragments in the Kinesis video stream.

      

    
      - **FragmentSelectorType** *(string) --* **[REQUIRED]** 

        The origin of the timestamps to use, ``Server`` or ``Producer``. For more information, see `StartSelectorType <https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_StartSelector.html>`__ in the *Amazon Kinesis Video Streams Developer Guide*.

        

      
      - **TimestampRange** *(dict) --* **[REQUIRED]** 

        The range of timestamps to return.

        

      
        - **StartTimestamp** *(datetime) --* **[REQUIRED]** 

          The starting timestamp for the specified range.

          

        
        - **EndTimestamp** *(datetime) --* **[REQUIRED]** 

          The ending timestamp for the specified range.

          

        
      
    
  
  :type S3RecordingSinkRuntimeConfiguration: dict
  :param S3RecordingSinkRuntimeConfiguration: 

    The runtime configuration for the S3 recording sink. If specified, the settings in this structure override any settings in ``S3RecordingSinkConfiguration``.

    

  
    - **Destination** *(string) --* **[REQUIRED]** 

      The URI of the S3 bucket used as the sink.

      

    
    - **RecordingFileFormat** *(string) --* **[REQUIRED]** 

      The file format for the media files sent to the Amazon S3 bucket.

      

    
  
  :type Tags: list
  :param Tags: 

    The tags assigned to the media insights pipeline.

    

  
    - *(dict) --* 

      A key/value pair that grants users access to meeting resources.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The key half of a tag.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The value half of a tag.

        

      
    

  :type ClientRequestToken: string
  :param ClientRequestToken: 

    The unique identifier for the media insights pipeline request.

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'MediaInsightsPipeline': {
              'MediaPipelineId': 'string',
              'MediaPipelineArn': 'string',
              'MediaInsightsPipelineConfigurationArn': 'string',
              'Status': 'Initializing'|'InProgress'|'Failed'|'Stopping'|'Stopped'|'Paused'|'NotStarted',
              'KinesisVideoStreamSourceRuntimeConfiguration': {
                  'Streams': [
                      {
                          'StreamArn': 'string',
                          'FragmentNumber': 'string',
                          'StreamChannelDefinition': {
                              'NumberOfChannels': 123,
                              'ChannelDefinitions': [
                                  {
                                      'ChannelId': 123,
                                      'ParticipantRole': 'AGENT'|'CUSTOMER'
                                  },
                              ]
                          }
                      },
                  ],
                  'MediaEncoding': 'pcm',
                  'MediaSampleRate': 123
              },
              'MediaInsightsRuntimeMetadata': {
                  'string': 'string'
              },
              'KinesisVideoStreamRecordingSourceRuntimeConfiguration': {
                  'Streams': [
                      {
                          'StreamArn': 'string'
                      },
                  ],
                  'FragmentSelector': {
                      'FragmentSelectorType': 'ProducerTimestamp'|'ServerTimestamp',
                      'TimestampRange': {
                          'StartTimestamp': datetime(2015, 1, 1),
                          'EndTimestamp': datetime(2015, 1, 1)
                      }
                  }
              },
              'S3RecordingSinkRuntimeConfiguration': {
                  'Destination': 'string',
                  'RecordingFileFormat': 'Wav'|'Opus'
              },
              'CreatedTimestamp': datetime(2015, 1, 1),
              'ElementStatuses': [
                  {
                      'Type': 'AmazonTranscribeCallAnalyticsProcessor'|'VoiceAnalyticsProcessor'|'AmazonTranscribeProcessor'|'KinesisDataStreamSink'|'LambdaFunctionSink'|'SqsQueueSink'|'SnsTopicSink'|'S3RecordingSink'|'VoiceEnhancementSink',
                      'Status': 'NotStarted'|'NotSupported'|'Initializing'|'InProgress'|'Failed'|'Stopping'|'Stopped'|'Paused'
                  },
              ]
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **MediaInsightsPipeline** *(dict) --* 

        The media insights pipeline object.

        
        

        - **MediaPipelineId** *(string) --* 

          The ID of a media insights pipeline.

          
        

        - **MediaPipelineArn** *(string) --* 

          The ARN of a media insights pipeline.

          
        

        - **MediaInsightsPipelineConfigurationArn** *(string) --* 

          The ARN of a media insight pipeline's configuration settings.

          
        

        - **Status** *(string) --* 

          The status of a media insights pipeline.

          
        

        - **KinesisVideoStreamSourceRuntimeConfiguration** *(dict) --* 

          The configuration settings for a Kinesis runtime video stream in a media insights pipeline.

          
          

          - **Streams** *(list) --* 

            The streams in the source runtime configuration of a Kinesis video stream.

            
            

            - *(dict) --* 

              The configuration settings for a stream.

              
              

              - **StreamArn** *(string) --* 

                The ARN of the stream.

                
              

              - **FragmentNumber** *(string) --* 

                The unique identifier of the fragment to begin processing.

                
              

              - **StreamChannelDefinition** *(dict) --* 

                The streaming channel definition in the stream configuration.

                
                

                - **NumberOfChannels** *(integer) --* 

                  The number of channels in a streaming channel.

                  
                

                - **ChannelDefinitions** *(list) --* 

                  The definitions of the channels in a streaming channel.

                  
                  

                  - *(dict) --* 

                    Defines an audio channel in a Kinesis video stream.

                    
                    

                    - **ChannelId** *(integer) --* 

                      The channel ID.

                      
                    

                    - **ParticipantRole** *(string) --* 

                      Specifies whether the audio in a channel belongs to the ``AGENT`` or ``CUSTOMER``.

                      
                
              
            
          
        
          

          - **MediaEncoding** *(string) --* 

            Specifies the encoding of your input audio. Supported format: PCM (only signed 16-bit little-endian audio formats, which does not include WAV)

             

            For more information, see `Media formats <https://docs.aws.amazon.com/transcribe/latest/dg/how-input.html#how-input-audio>`__ in the *Amazon Transcribe Developer Guide*.

            
          

          - **MediaSampleRate** *(integer) --* 

            The sample rate of the input audio (in hertz). Low-quality audio, such as telephone audio, is typically around 8,000 Hz. High-quality audio typically ranges from 16,000 Hz to 48,000 Hz. Note that the sample rate you specify must match that of your audio.

             

            Valid Range: Minimum value of 8000. Maximum value of 48000.

            
      
        

        - **MediaInsightsRuntimeMetadata** *(dict) --* 

          The runtime metadata of a media insights pipeline.

          
          

          - *(string) --* 
            

            - *(string) --* 
      
    
        

        - **KinesisVideoStreamRecordingSourceRuntimeConfiguration** *(dict) --* 

          The runtime configuration settings for a Kinesis recording video stream in a media insights pipeline.

          
          

          - **Streams** *(list) --* 

            The stream or streams to be recorded.

            
            

            - *(dict) --* 

              A structure that holds the settings for recording media.

              
              

              - **StreamArn** *(string) --* 

                The ARN of the recording stream.

                
          
        
          

          - **FragmentSelector** *(dict) --* 

            Describes the timestamp range and timestamp origin of a range of fragments in the Kinesis video stream.

            
            

            - **FragmentSelectorType** *(string) --* 

              The origin of the timestamps to use, ``Server`` or ``Producer``. For more information, see `StartSelectorType <https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_StartSelector.html>`__ in the *Amazon Kinesis Video Streams Developer Guide*.

              
            

            - **TimestampRange** *(dict) --* 

              The range of timestamps to return.

              
              

              - **StartTimestamp** *(datetime) --* 

                The starting timestamp for the specified range.

                
              

              - **EndTimestamp** *(datetime) --* 

                The ending timestamp for the specified range.

                
          
        
      
        

        - **S3RecordingSinkRuntimeConfiguration** *(dict) --* 

          The runtime configuration of the Amazon S3 bucket that stores recordings in a media insights pipeline.

          
          

          - **Destination** *(string) --* 

            The URI of the S3 bucket used as the sink.

            
          

          - **RecordingFileFormat** *(string) --* 

            The file format for the media files sent to the Amazon S3 bucket.

            
      
        

        - **CreatedTimestamp** *(datetime) --* 

          The time at which the media insights pipeline was created.

          
        

        - **ElementStatuses** *(list) --* 

          The statuses that the elements in a media insights pipeline can have during data processing.

          
          

          - *(dict) --* 

            The status of the pipeline element.

            
            

            - **Type** *(string) --* 

              The type of status.

              
            

            - **Status** *(string) --* 

              The element's status.

              
        
      
    
  
  **Exceptions**
  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.BadRequestException`

  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.UnauthorizedClientException`

  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.ThrottledClientException`

  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.ResourceLimitExceededException`

  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.NotFoundException`

  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`ChimeSDKMediaPipelines.Client.exceptions.ServiceFailureException`

  