Mandarin characters don't give us the sound of a word, so the Chinese invented pinyin to help their learners. They took the letters of the Roman alphabet, the same we use for English, and used it ...
Because Chinese characters are so complex, pinyin was developed by Chinese linguists ... you can type in English and then play the spoken version in Chinese. (Complicating things, Google Translate ...