Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Playing Sounds through the Speakers

Playing Sounds through the Speakers

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    max29297
    wrote on last edited by
    #1

    I'm making a program that requires you to take the sound from a microphone, change it (all it really has to do is change the pitch a little), and play it through the speakers. So... 1. How can you get the sound data from the microphone 2. How can you change the pitch (without speeding it up) 3. How can you play this changed sound data through the speakers? I haven't found any articles yet on CodeProject or Google. Any help here?


    Hippophobia - Fear of horses. What?


    R 1 Reply Last reply
    0
    • M max29297

      I'm making a program that requires you to take the sound from a microphone, change it (all it really has to do is change the pitch a little), and play it through the speakers. So... 1. How can you get the sound data from the microphone 2. How can you change the pitch (without speeding it up) 3. How can you play this changed sound data through the speakers? I haven't found any articles yet on CodeProject or Google. Any help here?


      Hippophobia - Fear of horses. What?


      R Offline
      R Offline
      Rudolf Jan
      wrote on last edited by
      #2

      I assume you want to use human speech, or you want arbitrary sounds? For your second question, look at phrases like speech processg, and LPC, You need some intensive processing to extract the pich and recreate the voice signal. These methods do not work for sounds in general. I don't think you will find samples on code project, you can use. Maybe the Micrososft speech processing APIs will help. (Don't know how they are colled exactly SAPI maybe?)

      Rudolf Heijink

      M 1 Reply Last reply
      0
      • R Rudolf Jan

        I assume you want to use human speech, or you want arbitrary sounds? For your second question, look at phrases like speech processg, and LPC, You need some intensive processing to extract the pich and recreate the voice signal. These methods do not work for sounds in general. I don't think you will find samples on code project, you can use. Maybe the Micrososft speech processing APIs will help. (Don't know how they are colled exactly SAPI maybe?)

        Rudolf Heijink

        M Offline
        M Offline
        max29297
        wrote on last edited by
        #3

        Not sure what arbitrary sounds are, but... Yes, it's going to be human speech mostly, but really, just any sound... I'm taking a look at SAPI right now. See, what I'm doing is taking the sound from the microphone, changing the pitch of the incoming sound, and then (immediately) playing the altered sound through the speakers. I was thinking I would start out by just playing the sound back normally through the speakers, without alterations, like a normal microphone hooked up to some speakers. Then, I'm going to need to know how to change the pitch of the sound and play simultaneously with the normal voice. I know that to play two sounds at once you pretty much just average the sine wavs, but I'm not sure how you would change the pitch. I was thinking that you would just increase the frequency of the wave and then increase the repetitions (so that it wouldn't come out faster), but I'm not quite sure how to do that yet... Also, I know how a .wav file works, so I could put the sound information into that, but I have no idea how I would play it through the speakers. Is there a way to change the position of that little thing inside the speaker (don't know what it's called, but it's the thing that moves back and forth to produce the sound) to the position that you specify?


        I wish I could drive...


        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups