Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch Convert WAV Files for use with Shoretel

    I did a ton of searching on this topic and found no solutions that worked well for me, so I figured I would post up a solution i put together for batch converting a large number of WAV files into a Shoretel compatible format.

    This procedure was done on a 32bit Windows 7 Professional Laptop, your mileage may vary on other OS's, but it should work fine.

    You are going to need the following to make this work:
    1. Windows PC
    2. Copy of sndrec32.exe from a Windows XP Machine
    3. A Program called AutoHotkey (AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText)


    Follow the steps below to batch convert:
    1. Install AutoHotkey
    2. Create a folder on the root of the C Drive of the machine you are using to convert the files called "WAVConvert" (C:\WAVConvert)
    3. Place a copy of sndrec32.exe into C:\WAVConvert
    4. Create a folder in C:\WAVConvert called "files" (C:\WAVConvert\files)
    5. Place all of the WAV files you want converted into that directory. Make sure you keep a copy of these files in another location as this process will overwrite the files.
    6. Open sndrec32.exe from WAVConvert folder (Vista\7 Users need to Right Click and "Run as Administrator")
    7. Select File -> Save As
    8. Click the "Change" button at the bottom of the window
    9. Select CCITT u-Law as the format and 8.000 kHz, 8 bit, Mono 7kb/sec as the attributes.
    10. Click the Save As button and name the setting "Shoretel"
    11. Press OK, Cancel, then close Sound Recorder
    12. Now we need to create a script for AutoHotKey to follow, so open your favorite TXT editor and copy paste in the following:

      #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
      SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
      SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

      Loop, C:\WAVConvert\files\*.wav,0,0
      {
      Run C:\WAVConvert\sndrec32.exe %A_LoopFileFullPath%
      Sleep 3000
      Send {Alt}
      Send {f}
      Send {a}
      Sleep 3000
      Send !{c}
      Send {s}
      Send {Enter}
      Send {Enter}
      Send {Enter}
      Sleep 3000
      Send !{F4}
      }
      Return


    13. You may need to adjust the sleep values based on the speed of your computer. I had mine set at 1000, but changed it to 3000 for this post to avoid anyone having trouble.
    14. Save the file as Shoretel_WAV_Convert_loop.ahk in the C:\WAVConvert folder
    15. Everything is now ready to go. Please keep in mind that this solution is basically just running a macro, so you will not be able to use the PC while it is running this script.
    16. Right Click "Shoretel_WAV_Convert_loop.ahk" and choose "Run Script", sit back and enjoy.

  • #2
    thank you so much!! I was having a difficult time converting files that a customer had given me.

    Comment


    • #3
      My solution was a bit different

      Download SoX SoX - Sound eXchange | Download SoX - Sound eXchange software for free at SourceForge.net

      Extract SoX to a new directory eg Sox
      Create a ToBeConverted and ShoreTelFormat directory underneath the SoX folder

      Structure should be

      Code:
      SoX -|
            - ToBeConverted
            - ShoreTelFormat
      1. Make sure the files to be converted are in wav format and copy them to the ToBeConverted directory

      2. Run convert.bat provided below

      This will convert the files to Mono 8-bit 8khz Mu-law

      Copy into notepad and save as Convert.bat (Make sure not to save as convert.bat.txt )
      Code:
      cd ToBeConverted
      FOR %%z IN (*.wav) DO ..\sox %%z -r 8000 -b 8 -c 1 -e mu-law ..\ShoreTelFormat\%%z
      pause

      Comment


      • #4
        Thanks!

        Worked like a charm! Thanks!

        Comment


        • #5
          The SoX solution worked best for me. When I used sndrec32.exe to convert a WAV file, the converted file exhibited excessive sibilance (very lispy-sounding "s" and "f" sounds). The SoX-converted file sounded much better.

          Thanks for the great instructions, they worked a treat!

          Comment


          • #6
            Happy to help avisnyai. :_smile:

            You can convert straight from mp3 to shoretel format using SoX but you need a precompiled version of libmad.dll.

            I tried to attach the current setup I use to convert files but it wouldn't upload so here is the dropbox link https://dl.dropboxusercontent.com/u/..._Converter.zip (2.8mb), I reduce the volume alot because of how our trunks are setup. If you don't want to do that then you can modify the batch files removing the command option -v 0.05

            Sox is available at:
            SoX - Sound eXchange | HomePage

            Libmad source at:
            MAD (MPEG Audio Decoder) | Free Audio & Video software downloads at SourceForge.net
            Last edited by crimson.falconer; 08-19-2013, 04:26 AM.

            Comment

            Working...
            X