The spanish form might be close phonetically but it's not remotely related
Oir it's a verb on and by itself and comes from latin audīre and the "¡Oye!" Expression is usually used as a retort, not as an initiator. In cooking settings "¡Oido!" Is used both as a call for attention as an answer.