An almost periodic noncommutative Wiener's Lemma