def sample_recognize(local_file_path):
    '\n    Transcribe a short audio file with multiple channels\n\n    Args:\n      local_file_path Path to local audio file, e.g. /path/audio.wav\n    '
    client = speech_v1.SpeechClient()
    audio_channel_count = 2
    enable_separate_recognition_per_channel = True
    language_code = 'en-US'
    config = {'audio_channel_count': audio_channel_count, 'enable_separate_recognition_per_channel': enable_separate_recognition_per_channel, 'language_code': language_code}
    with io.open(local_file_path, 'rb') as f:
        content = f.read()
    audio = {'content': content}
    response = client.recognize(config, audio)
    for result in response.results:
        print(u'Channel tag: {}'.format(result.channel_tag))
        alternative = result.alternatives[0]
        print(u'Transcript: {}'.format(alternative.transcript))
Transcribe a short audio file with multiple channels

Args:
  local_file_path Path to local audio file, e.g. /path/audio.wav
def sample_recognize(local_file_path):
    '\n    Transcribe a short audio file with multiple channels\n\n    Args:\n      local_file_path Path to local audio file, e.g. /path/audio.wav\n    '
    client = speech_v1.SpeechClient()
    audio_channel_count = 2
    enable_separate_recognition_per_channel = True
    language_code = 'en-US'
    config = {'audio_channel_count': audio_channel_count, 'enable_separate_recognition_per_channel': enable_separate_recognition_per_channel, 'language_code': language_code}
    with io.open(local_file_path, 'rb') as f:
        content = f.read()
    audio = {'content': content}
    response = client.recognize(config, audio)
    for result in response.results:
        print(u'Channel tag: {}'.format(result.channel_tag))
        alternative = result.alternatives[0]
        print(u'Transcript: {}'.format(alternative.transcript))