cmusphinx / g2p-seq2seq

G2P with Tensorflow
Other
670 stars 194 forks source link

Mapping phonemes to the corresponding graphemes #86

Closed MahirEusufzai closed 7 years ago

MahirEusufzai commented 7 years ago

Is it feasible to show which phonemes represent which segment of each word?

For example, instead of the output being

tensorflow T EH N S AO R F L OW

it would be

tensorflow t - T e - EH n - N s - S o - AO r - R f - F l - L ow - OW

nshmyrev commented 7 years ago

There is no exact mapping in seq2seq, but there are attention weights which are shifting from start to end, by learning the weights you can see what phoneme was derived from which chunk of the input string. One has to modify the seq2seq code to retrieve them though, see for details:

https://stackoverflow.com/questions/40601552/visualizing-attention-activation-in-tensorflow

nshmyrev commented 7 years ago

See also https://github.com/tensorflow/tensorflow/issues/1668