I capture an audio from a speaker where they say - "I want to meet John Disilva"
. I pass this to Google Speech API with Phrase as { 'John Disilva', 'Ashish Mundra'}
. However, Google Speech API returns me full phrase i.e. - 'I want to meet John Disilva'
.
Is there a way I can only get my phrase as return value as I am only interested to extract the name part?
The reason is that I cannot control what someone is saying to my mic. They can say 'I would like to see John Disilva'
or 'Do you know John Disilva'
, but I am sure that my user will always have that name somewhere in this sentence which I want to extract.
If Google Speech API can give me the exact phrase via which it was able to detect John Disilva
in that sentence then I can use that Phrase for further processing in my code.