While technically correct, "duologue" is often seen as pretentious or unnecessarily formal. Most people would simply use "dialogue" in its place.
Here's an example:
"The play featured a powerful duologue between the two main characters, revealing their conflicting motivations."
In this case, you could replace "duologue" with "dialogue" and the meaning would remain the same.