Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by SnotE101 · Sep 17, 2014 at 04:10 AM · c#audiovoicerecognition

Compare two Audio Clips

The title explains its self, but here is the context; I am creating a voice recognition program. One key element is to compare two audio clips together. How would I go about doing this?

Thanks before hand!

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image LearnUnity3d · Sep 17, 2014 at 04:55 AM 1
Share

$$anonymous$$ay be THIS can help you..Dharmesh

avatar image Baste · Sep 17, 2014 at 10:36 AM 2
Share

Voice recognition is incredibly complicated.

You can generally figure out if two sound files are exactly the same or pretty similar, but checking if a spoken line is similar to the same line spoken by somebody else, or to a string of text? $$anonymous$$icrosoft has probably poured millions of dollars into the problem, and the $$anonymous$$inect's voice recognition is still not ideal.

I'm not trying to put you down, but a voice recognition program is no small feat.

avatar image jjplay175 · Sep 17, 2014 at 10:59 AM 1
Share

As Baste stated you are pretty much asking how to do the most fundamental part of Voice Recognition and I hope you have the best of luck on this but I don't think you are going to get exactly what you want from unity that simple

Your best bet would be to spend a lot of time studying the subject if you truly feel it is needed in your game, from what I know unity does not support anything like that and you would have to do a lot of work to achieve it

An idea would be to see if you can find a way to use microsofts voice recognition in the way that you can tell it to write things in a notepad? look at it like that so that if the voice input = Hold then it runs a script

avatar image Andres-Fernandez · Sep 17, 2014 at 11:33 AM 1
Share

First, you need to define what "compare two audio clips" mean. Do yo mean de file itself? The content? Compare them based on what? (there are many parameters to measure in an audio clip)

If it's just the file, go compare them as regular files. If it's the content, it is a very complicated thing (as others have said before). I suggest you use some platform specific tool. Windows itself comes with voice recognition (I haven't tried other platforms). Google it.

avatar image SnotE101 · Sep 17, 2014 at 02:44 PM 0
Share

Thanks a lot guys, got great info.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by VesuvianPrime · Sep 17, 2014 at 01:19 PM

If we're talking about the waveform data there are different metrics to consider:

Trivial:

  • The length of the audio

  • The number of channels

  • The sample width

  • The framerate

Medium:

  • The amplitudes

Hard:

  • The tempo

  • The frequencies

By the looks of it, Unity actually does a lot of the work for you here.

AudioClip seems to cover the trivial items, while AudioSource provides FFT functionality (for frequency analysis).

For amplitudes you can simply sum the deltas between 2 curves at each sample, though you might want to do some volume normalization first if you only care about the shape.

Tempo is odd, you can probably ignore it, but just in case: Beat Detection

The more of these metrics you can calculate, the more accurate your "similarity" metric is going to be.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SnotE101 · Sep 17, 2014 at 02:45 PM 0
Share

Thanks, didn't realize I could compair audio with these variables.

avatar image arrezes · Mar 15, 2020 at 01:39 PM 0
Share

Dear @VesuvianPrime

Your answer is convincing but looked complicated to me to achieve. But in my case could be simpler to solve. I am trying to recognize pause in the speech. and filler words such as "urm" "uh" "err"

Does using fft comparison will be good enough to do the trick?

So sorry for being late in the discussion. Just recently embark on this project.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

29 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Compare 2 Recorded Voices? 1 Answer

Multiple Cars not working 1 Answer

Real Voice Print Authentication 0 Answers

Distribute terrain in zones 3 Answers

How to adjust game sound from UI Slider? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges