Well, I have a program which uses a speechRecognition plugin from Ionic which takes listen and the result is put in an alert, it would be possible to put the resulting information in an input or a textarea, this is my code
import { Component } from '@angular/core';
import { SpeechRecognition } from '@ionic-native/speech-recognition/ngx'
@Component({
selector: 'app-voicetext',
templateUrl: './voicetext.page.html',
styleUrls: ['./voicetext.page.scss'],
})
export class VoicetextPage {
constructor( private speechRecognition: SpeechRecognition) {}
startListening() {
this.speechRecognition.startListening().subscribe((speeches)=>{
alert(speeches[0]);
},(err)=>{
alert(JSON.stringify(err));
})
}
}
Este es mi HTML
<ion-header
<ion-title color="light">Voz a Texto</ion-title>
</ion-header>
<ion-content>
<ion-button
(click)="startListening()">
</ion-button>
<ion-card class="ion-padding-horizontal">
<ion-textarea
rows="15" cols="20"
></ion-textarea>
</ion-card>
</ion-content>