@classmethod
def _from_dict(cls, _dict):
    """Initialize a SpeechRecognitionAlternative object from a json dictionary."""
    args = {}
    if 'transcript' in _dict:
        args['transcript'] = _dict.get('transcript')
    else:
        raise ValueError(
            "Required property 'transcript' not present in SpeechRecognitionAlternative JSON"
            )
    if 'confidence' in _dict:
        args['confidence'] = _dict.get('confidence')
    if 'timestamps' in _dict:
        args['timestamps'] = _dict.get('timestamps')
    if 'word_confidence' in _dict:
        args['word_confidence'] = _dict.get('word_confidence')
    return cls(**args)
