Text this: Generalized dualities for heterotic and type I strings