Italian 'sì', Spanish 'sí' and many more Romance words for "yes" come from Latin 'sīc', which meant "so; thus; like that". In Popular Latin it got an extra meaning: "yes", born out of the sense "like that", i.e. "like you said".
French 'oui' has a completely different origin. It comes from Old French 'oïl', a univerbation of 'o il', literally "yes, it (is/does/has etc.)".
'O' stemmed from Latin 'hoc' (this), which became 'òc' (yes) in Occitan, whose name was derived from this very word.
@yvanspijk Hence: Languedoc