Jump to content

lerxstrulz

501st Stormtrooper[TK]
  • Posts

    166
  • Joined

  • Last visited

Posts posted by lerxstrulz

  1. Disregard previous post.... I read back and did mostly what lerxstrulz did in the TKCONFIG file except changed a few lines for my setup. I think my volume knob is not connected to the board well enough so I had to bypass it using the volume command in the text file. Here's my current config:

     

    Sounds great!

     

    The headphone out is an amplified signal, so it becomes a balancing act of sending that signal to an amplifier and avoiding feedback.  I ordered some more boards but haven't had a chance to play with them over the holidays but wanting to see just how loud the Teensy can get without an amp (instead connecting speaker directly to Teensy) and am also going to experiment with the line out connections running through my Aker. I'm able to get my setup pretty loud without feedback, but wanting to see just how far I can realistically push it ;)

  2.  

    Just tried upgrading to 2.0. Pretty sure I copied everything correctly. Now, I have what sounds like white noise constantly running and no mic input working at all. Any suggestions?

     

    # MICROPHONE/LINE-IN SETTINGS
    # input settings (0 = microphone, 1 = line-in)
    [input=0]
     

     

     

    Ugh, the microphone/line-in values are backwards ;)   I've corrected them on github.  Should be 1 for microphone.

     

    Also, I noticed the mic_gain was set to 20.  I actually have mine cranked all the way down to 3 and just added more to the voice gain, and I can crank my amp up almost all the way without any type of feedback.  This is my current settings file.  It worked really well last night at the Rogue One premier  :smiley-sw013:

    TKTalkie v2.0 www.tktalkie.com
    [volume=0.5500]
    # sound to play when TKTalkie is started
    [startup=STARTUP.WAV]
    # chatter loop settings
    [loop=CHATTER.WAV]
    # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
    [loop_gain=0.040]
    # VOICE SETTINGS
    # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
    [voice_gain=1.5000]
    [voice_start=0.040]
    [voice_stop=0.021]
    [silence_time=350]
    # PTT (Push-To-Talk) SETTINGS
    [button_pin=0]
    [button_click=TKT_CLK3.WAV]
    # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
    [button_gain=1.0000]
    # MICROPHONE/LINE-IN SETTINGS
    # input settings (0 = microphone, 1 = line-in)
    [input=1]
    # 0 to 63
    [mic_gain=3]
    # SOUND EFFECTS (STATIC BURSTS, ETC.)
    # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
    [effects_gain=0.4500]
    # EQUALIZER SETTINGS
    # 0 = flat (none, 1 = parametric, 2 = bass/treble, 3 = graphic
    [eq=3]
    # for parametric/graphic = 5 bands, for bass/treble = 3 bands
    # bands are low to high: -1 (-11.75dB to 1 +12dB)
    [eq_bands=1.00,0.50,-0.50,-0.50,-1.00]
    # BITCRUSHER SETTINGS - VOCAL EFFECTS
    # Format = bits1,rate1,bits2,rate2
    # Set to 16,41000,16,41000 to just pass-thru (disable)
    [bitcrushers=12,16384,10,10240]
    # PINK NOISE GENERATOR
    # 0 to 32767, 1 is pass-thru, below 1 attenuates signal
    [noise_gain=0.1500]
    [debug=0]
  3. Setting the pin high in VoiceOn() sounds fine, and that is what I have done already, but if I set it low during VoiceOff() it can clip the ending static burst. Is there a way to determine the duration of the .wav file so that I could use millis() to determine in the main loop when to pull the pin low? I could always just cheat and say 2 seconds after the end it will pull it low, but then someone out there will make their own crazy static burst sound that is 4 seconds long and they will complain that it won't play the whole thing.

     

    Let me elaborate on that...

     

    in the playEffect() function, there is a 10 ms pause to give time to get the length of the WAV file.  You could try using something like this:

    /***
    * Play the specified sound effect from the SD card
    */
    long playEffect(int player, String filename)
    {
       long len = 0;
       // Convert string to char array
       char buf[filename.length()+2];
       filename.toCharArray(buf, filename.length()+2);
       // Start playing the file. This sketch continues to
       // run while the file plays.
       switch (player) {
         case LOOP_PLAYER:
         loopPlayer.play(buf);
         delay(10);
         len = loopPlayer.lengthMillis();
         break;
       default:
         effectsPlayer.play(buf);
         delay(10);
         len = effectsPlayer.lengthMillis();
         
         /* NEW CODE */ 
         elapsedMillis effectsMs;
    
         // Add the speaking check so that it doesn't cut off 
         // if the user starts talking again before this loop is finished
         while (effectsPlayer.isPlaying() && speaking == false) {              
           if (effectMs >= len) {
             // TURN OFF THE AMP HERE
           }
         }
    
         break;
       }
       debug("PLAYING " + filename + " @ " + String(len) + " ms (" + String(len/1000) + " sec)");
       return len;
    }

    That loop is asynchronous, so program execution continues while it is looping so I added a speaking check in case the user starts talking again right away...don't want to cut them off lol.  You could also add that check in the function that turns off the amp, ie:

    function ampOff() {
         if (speaking == false) {
            // turn it off
         }
    }

    I haven't tried any of this code, but that should get you started :)  Also, the only thing is, this precludes the use of a background chatter loop as it plays constantly.

     

     I really love this idea, I think it's a great addition.  I wonder if there is a way to do it with the Aker? 

  4. Setting the pin high in VoiceOn() sounds fine, and that is what I have done already, but if I set it low during VoiceOff() it can clip the ending static burst. Is there a way to determine the duration of the .wav file so that I could use millis() to determine in the main loop when to pull the pin low? I could always just cheat and say 2 seconds after the end it will pull it low, but then someone out there will make their own crazy static burst sound that is 4 seconds long and they will complain that it won't play the whole thing.

    Absolutely! Just check out the playEffect function.

     

    Sent from my SAMSUNG-SM-G930A using Tapatalk

  5. So cool seeing things people come up with. 

     

     

    I have v2 installed and I noticed I can change all the settings. Just need the time. We are slowly moving a mile down the road and should be done by the weekend hopefully! One thing I noticed when I did play with it, is there a way to confirm the teensy is using the text file settings instead of the compiled code? 

     

    What I have done in the V2.1 I posted yesterday was remove the background loop default.  That way I know if the file is loading or not....i.e. if my background loop starts I know it's loaded the file.  Also, while you are in serial monitor (if using the Arduino editor) you can enter the word settings and hit enter and it will display the current settings so you can verify them.

    • Like 1
  6. I am working on building my own Aker-style unit that, like the Icomm combo, will power the TKTalkie from the speaker unit. The amplifier that I am using has an output enable pin that when grounded shuts down the amp to conserve power, so I am trying to figure out a way to have the TKTalkie code set that pin to ground when no audio is playing and then set it high just prior to calling to play a file or sending some mic output through.

     

    Very cool!  You should be able to piggyback this in the VoiceOn() and VoiceOff() functions.  Just assign the pin in setup() (you may need to set it to HIGH as well to activate it), then you should be able to send HIGH in VoiceOn() and LOW in VoiceOff().  It "may" cause a pop when you turn it on and off, but that would be a cool effect IMO.

     

     

    Second, the power boost converter I am using to step up the 3.7V lithium cells to 5V has a low battery output, that I am sending to the TKTalkie so that it will play a "LOWBATT.wav" file to alert you if your about to have a "bad comm" situation.

     

    Awesome!  Can't wait to see it!

  7.  

    I made a quick change to the code to check if the file exists (and blow it away if it does), but there's still something funky with the format being written and the app doesn't read it properly.

     

    File openFile(String filename, int mode) 
    {
      char buf[filename.length()+2];
      filename.toCharArray(buf, filename.length()+2);
      if(mode == FILE_WRITE){
        if(SD.exists(buf)){
          SD.remove(buf);
        }
      }
      return SD.open(buf, mode);  
    }

     

     

    Ok I posted a code update that fixed a the file save issue  (credited in code) and another issue regarding the background loop restarting too soon.

     

    It is able to read the saved file and parse it ok.  Let me know if this update does not fix your problem.

    • Like 1
  8. I'm in the middle of a house move so hopefully in a week I'll have my workspace set back up. I think the volume knob may be the issue or I'll have to cave and start using a Anker speaker instead of hovi tip speakers.

     

    In v1 and v1.1 the input channels for voice and effects are heavily attenuated (muted).  Once you are set back up I bet you can get those channels pretty loud by pushing them over 1 (limit is 32767).  You will prob have to lower mic gain to compensate for the extra levels to avoid feedback, but I bet you can get it all pushed up pretty loud for the Hovis.

  9. I'll have to hook everything back up when I get home, but I believe it looks like the second half of the file I posted above above, starting with the second instance of "#sound to play...".

     

    Ok I will copy that and try it later this eve as well.

     

    One thing I noticed is there is a space for [voice_stop=  0.020]  That might be causing it.

     

    Try adding this to the beginning of the parseSetting function:

     

    settingName = settingName.trim();

    settingValue = settingValue.trim();
     
    I won't be able to test this until later tonight, though.
  10. I used 3.5 HDD screws I had laying around at work. Just had to drill the holes a tad larger. <br><br>

    The problem I have right now is I can hardly hear it coming out my hovi tip speakers. I'm not sure if it's because I still have the teensy plugged into my laptop for power or there's something in the settings. My mic is plugged into 3.5mm I added on the teensy. On board out is connected mic on Ukswrath's amp2, and hovi connected to speaker on amp 2. The teensy volume is turned all the way as well as amp2.

     

    I noticed on my first build that the thumb (volume) pot did not work properly.  I doubled checked all the solder points and they were fine.  In the V2 software you can directly override the input from the volume pot, so maybe try setting the volume there to see if the volume pot is maybe not working correctly.  The setting is:

     

    [volume=n]  // 0.0 to 1.0

     

    You can also set the gain on the effects (effects_gain) and voice (voice_gain) channels (0 to 32767).  1 = pass thru, < 1 attenuates (mutes) and > 1 boosts

  11.  

    I made a quick change to the code to check if the file exists (and blow it away if it does), but there's still something funky with the format being written and the app doesn't read it properly.

     

    File openFile(String filename, int mode) 
    {
      char buf[filename.length()+2];
      filename.toCharArray(buf, filename.length()+2);
      if(mode == FILE_WRITE){
        if(SD.exists(buf)){
          SD.remove(buf);
        }
      }
      return SD.open(buf, mode);  
    }

     

     

    Oops hey yeah thanks for that!  I actually have that added but didn't get committed to the repo...

     

    Can you post or PM what your file looks like after saving?

  12. Hi all,

     

    the project is very cool. I have all the parts connected / soldered them but cannot handle the massive feedback problem (Version 1.1 or 2: no difference). I want to have all parts in the helmet and would like to install the speaker (it's not a aker speaker) in the chin. I played with the parameters (eg. mic gain) without success.

     

    Do you have any ideas to eliminate the feedback? I also tries to isolate the speaker with foam material. In my opinion this had no effect.

     

    Anyone installed all parts in the helmet?

     

    Any advice is welcome.

     

    Eek no...I have a wireless mic in my helmet and everything else behind the chestplate (incl Aker.)  At first I got really bad feedback when I cranked up the Aker and after messing around with settings realized the mic gain was way too high at the default 36 and tuned it to 15 and now I can crank the speaker pretty loud.

     

    If you are putting everything in the helmet, you may also need to insulate the TKTalkie board.  If you will post or PM your config file I'll take a look at the settings and see if there is anything to tweak.

     

    Also, don't forget you can tweak settings on-the-fly with the serial interface in V2, so it may help to hook everything up and play with settings in real-time.

  13. Hey guys, Version 2.0 of the sofware has been released!  I started a new thread for this release, but improvements include:

     

    • Text config file
    • Live-edit settings via the serial interface...real-time testing and tweaking!
    • Background (chatter) loop support.
    • Calibration wizard to help set voice activation settings.

    Visit tktalkie.com for details!  I also posted an upgrade tutorial to go from Version 1 to Version of the software.

     

    I wanted a way to be able to use TKTalkie in different scenarios (I've also been working on a Mando costume and wanted a different sounding voice for that.)  I also wanted a way to be able to use the voice changer module (until it's part of the Teensy library!) without having to recompile the software after a settings change.

    • Like 4
  14. VERSION 3 NOW AVAILABLE!

     

    TKTalkie is a DIY voice effects project that you can build.  Version 2 of the TKTalkie software has been released with some significant improvements.

     

     

    The goal of this release was to allow you to be able to configure and tweak settings WITHOUT having to edit and recompile the source code.

    • Added support for text config file that holds all settings.
    • Added serial interface that lets you LIVE edit settings so you can test in real-time.
    • You can save and load different config settings files, allowing you to create custom configs for different applications of TKTalkie.
    • Added Calibration Wizard that helps you find optimum settings for Voice Activation.
    • Added support for background (chatter) loop.

    Version 2 source code is here.

     

    If you are using Version 1, see how to upgrade.

     

    Original Whitearmor.net topic is here.

     

    Visit www.TkTalkie.com for more information including tutorials!

     

     

    UPDATE: Version 2.2 has been released with some additions!

     

    Please go to www.tktalkie.com for updated code and the new tutorial.

    • Like 4
  15. afa245f3731a2f84bf1fe3a8acedb1d0.jpg

     

    Hey guys! Ever since I made the first TK Talkie I have been wanting to add the ability to have pitch modulation so that the voice could be lowered.

     

    The other day I was ordering the Velleman MK136 on Amazon.com to make a hearing assist for my bucket and came across the Velleman MK171 Voice Changer! And guess what? It works GREAT!

     

    I don't have a video yet but it lowers my voice enough to really make it sound cool. Of course there are a few caveats:

     

    1. It comes as a kit...you have to solder all the parts on the board.

     

    2. It's approx 3 x 2 inches, so it takes up more room. Also, it runs off of a 9 volt, so another power supply...

     

    3. It has buttons to raise and lower pitch (you can get some great Darth Vader sounds lol) BUT it also has "Robot Voice" and Vibrato. Whenever you turn it on it starts in Robot Voice mode so you have to change it.

     

    ALSO, and very important, the Teensy sketch has to be modified to NOT use white noise or bit crushing. My plan is to release a new sketch for use with the MK171...or if you go this route just disable the bit crushers and noise generator.

     

    The new Teensy 3.5 and 3.6 are out but still do not have the pitch shifting yet, so in the mean time this is a great and simple alternative!

     

     

     

    Sent from my SAMSUNG-SM-G930A using Tapatalk

  16. So I FINALLY got my suit ready for submission, and of course for Halloween, and have been putting TKTalkie through its paces.  I got HORRIBLE feedback when I put the helmet on, and played with different settings (Aker volume, TKTalkie volume, mixer gains, etc.) and finally realized the default mic gain is way too high at 36.  The signal is really hot.  I set it to 15 and am able to crank the Aker and get really good volume now without any feedback.  It's nice and loud  :peace:

     

    Changing the mic gain also means tweaking the trigger settings a tad.  I had to lower my min threshold by .01 because with reduced mic gain the amplitude is less so it would trigger the clicks too early, but it's working really well now as well.

     

    So, if you are having feedback issues, first place to look is the mic gain setting.  And if you adjust the mic gain, remember to recalibrate the trigger settings  :smiley-sw013:

     

    HAPPY HALLOWEEN!

    • Like 2
  17. I just finished soldering and testing everything and its working GREAT !!! I have 2 questions:

     

    1- How do I setup the minimum time the Teensie waits before turning the mic channel on ? I will start talking and it takes about half a second to turn on the speaker, so my first word comes from my helmet, not my aker.

     

    2- I don't understand how to properly wire the PTT. you are talking about pin 0,1 or 2. Do I choose any of these 3 pins for one wire and where do I take my voltage from ? Would you have a quick sketch ?

     

    Thanks again

     

    Pat

    1. You'll prob need to adjust the trigger level for you mic. There is a Sep 2 post on this thread that explains a good way to determine that. On my Tapatalk app it's post #86 on page 9.

     

    2. Your voltage is from one of the pins you select (just be sure your sketch has whichever pin you select set correctly to match.) Then connect the other wire to the ground circuit.

     

    Sent from my SAMSUNG-SM-G930A using Tapatalk

    • Like 1
×
×
  • Create New...