Have you ever had such an engrossing inner monologue that you felt inclined to ask: "Did I just say that out loud?"

For most of us, the thought of accidentally blabbing our inner voice in public is a mortifying one; the conversations we have with ourselves are often fraught with secret feelings or social faux pas.

But now a breakthrough new technology developed by researchers at the University of California, San Francisco (UCSF), .It's a veritable mind-reading implant capable of translating your brain activity into synthetic speech, and it's shockingly accurate, reports MedicalXpress.com.

Not only does the technology translate sentences that you're thinking in your brain into audible speech, but the synthetic voice that gets generated operates with a virtual vocal chord that can mimic your manner of speaking, too. So any meaning that's contained in your inflections or emphases — like when conveying sarcasm, for instance — will also come across.

It's pretty spooky how accurate it is. You can hear some examples in the video provided by UCSF at the top of this story.

"For the first time, this study demonstrates that we can generate entire spoken sentences based on an individual's brain activity," said Edward Chang, MD, a professor of neurological surgery and member of the UCSF Weill Institute for Neuroscience.

Of course, the purpose of the technology is not to snoop on everyone's secret thoughts, though it could certainly be used in this way. Rather, it has real medical benefits for individuals who have lost the ability to speak, such as individuals suffering from conditions like locked-in syndrome, ALS, or paralysis.

"This is an exhilarating proof of principle that with technology that is already within reach, we should be able to build a device that is clinically viable in patients with speech loss," said Chang.