Or, just try holding your breath for 30-45 seconds. I'm betting you've discovered a round-about way to achieve the same mechanism of action (raising level of CO2 in your blood).
https://www.bbc.com/future/article/20140127-do-hiccup-remedi...
It does work, but it's not easy and usually take 5+ attempt to stifle the one that forces through.