How to transcribe Speech
constructor(props) {
super(props);
this.state = {
displayText: 'INITIALIZED: ready to test speech...'
}
}
async componentDidMount() {
// check for valid speech key/region
const tokenRes = await getTokenOrRefresh();
if (tokenRes.authToken === null) {
this.setState({
displayText: 'FATAL_ERROR: ' + tokenRes.error
});
}
}Calling Speech-to-Text with the microphone stream data
Last updated
Was this helpful?
