Move speech browser functions into directive.