Use case of finding the name from phonetic transcription

Hi All,
I have a use case where I want to extract the name from the phonetic transcription. For example if the phonetic transcription is - “m a j n e j m ɪ z s ʌ m i ɹ z o w ʃ i”, the output should be the name that is - “s ʌ m i ɹ z o w ʃ i” . Similarly if the phonetic transcription is - “juː kæn kɔːl miː s ʌ m i ɹ z o w ʃ i”, then output would be “s ʌ m i ɹ z o w ʃ i”.
This is nothing but extracting name from the phonetic transcription.
What could be the best suitable and easy way to achieve this?
I think it would be kind of sequence to sequence model where the input is sentence and output is name.
If yes, I am looking for guidance on the model type and if there in any fine tuning that may need to be done for achieving this.

I am not completely sure but if you can map those phonetics to corresponding charachters it would be as easy as using a hash table!