Using inversion in the following sentence: I only realized what trouble he was in when I heard his voice trembling.
Only when I heard his voice trembling did I realize what trouble he was in.
Using inversion in the following sentence: I only realized what trouble he was in when I heard his voice trembling.
Only when I heard his voice trembling did I realize what trouble he was in.