"While you were talking about 〇〇, I realised that ~"
- "While you were talking, I just realised that ~"
"while you were talking" 「あなたは話しているうちに」
"while ~" 「〜うちに」
"I just realised that ~" 「〜だと気がついた」"just" を使わなくても大丈夫です。
- "While you were talking about 〇〇, I realised that ~"
"while you were talking about 〇〇" 「あなたが〇〇について話しているうちに」
"I realised that ~" 「〜だと気がついた」
「あなたに悩みを話しているうちに」は "while you were talking about what worries you." や "while you were telling me about your troubles." 言えますが相手が悩み話しているのを言わなくていいので言いたら少し無礼です。代わりに相手の悩みの話題を言っても大丈夫です。
"while you were talking about your job." 「あなたの仕事について話しているうちに」
それとも 「話しているうちに」"while you were talking" だけ言っても大丈夫です。