def transcript(cloud_response):
    """Get text transcription with the highest confidence 
    from the response from google cloud speech-to-text 
    service. 

    Args: 
        cloud_response: response from speech-to-text service
    
    Returns:
        (transcription, confidence): string value of transcription
        with corresponding confidence score
    """

    transcription = None
    confidence = 0.0
    try:
        for result in cloud_response.results:
            for alt in result.alternatives:
                if confidence < alt.confidence:
                    confidence = alt.confidence
                    transcription = alt.transcript
    except:
        pass
    return (transcription, confidence)