src/Response/Speech.php
public function setType($type)
    {
        if (!in_array($type, $this->validTypes)) {
            throw new \Exception('Invalid speech type'); //todo: should be specific exception ?  is this helpful?
        }

        $this->type = $type;

        return $this;
    }
public function setType($type)
    {
        if (!in_array($type, $this->validTypes)) {
            throw new \Exception('Invalid speech type'); //todo: should be specific exception ?  is this helpful?
        }

        $this->type = $type;

        return $this;
    }
@param string $type

@throws \Exception

@return $this