Microphone widget for voice transcription

Is there a widget or way to call a microphone function? We are looking to integrate this app with Amazon Transcribe for real-time voice transcription.