Skip to content

Instantly share code, notes, and snippets.

@SteveALee
Last active September 26, 2025 07:28
Show Gist options
  • Save SteveALee/da24c2be633340b8791066dd98eb5d0b to your computer and use it in GitHub Desktop.
Save SteveALee/da24c2be633340b8791066dd98eb5d0b to your computer and use it in GitHub Desktop.
Build audacity with ASIO support on Windows

Build your own Audacity for Windows with ASIO driver support

You might want Audacity to work with the ASIO drivers supplied with your sound devices. Commmon reasons for this are:

  • Only ASIO drivers are available for your hardware (eg Behringer mixers)
  • Performance - ASIO has low latency (delays)
  • You don't want to use the ASIO4All bridging driver with non ASIO drivers
  • Multi channel support - though Audacity is not so good at handling other than Stereo or Mono

Due to licensing restrictions the Audacity team cannot provide a prebuilt version with Windows ASIO driver support. But with this guide and script you can easily build your own Audacity with ASIO support, on a Windows PC.

This builds the latest Audacity release 3.7.5 by default. Recent other versions can be built with the -v option

ko-fi

Background

Drivers are the glue between an audio program like Audacity and external hardware like a mixer or sound interface. The drivers usually used on Windows have limitations which can be overcome if you use ASIO drivers for your hardware. Specifically, low latency (delay) and multi channel support are available with ASIO drivers.

The Audacity program is the "go to" solution for many audio recording and editing tasks. However, unlike many more advanced DAWs, it doesn't support Windows ASIO drivers "out of the box". Fortunately, Audiacity's standard MME support is fine for most uses. That said, common reasons for needing ASIO include using digital audio or music equipment that only comes with ASIO drivers, such as Behringer mixers (which actually suggest using the less efficient ASIO4ALL ASIO to WDM bridging driver). Another common reason is to take advantage of the low latency or multiple channels supported by ASIO. Note that Audacity really is not a good multichannel solution, so if that is required a DAW might be a better bet.

While it is possible to build your own Audacity with ASIO support by following the instructions this usually requires considerable technical skills.

But have no fear, the instructions and script provided here make it easy to build your own version of Audacity with ASIO support. You just need a suitable Windows PC. The script installs all required tools and builds a 64 bit release version of Audacity with ASIO for you using the official build instructions.

NB. If you do use this to build Audacity with ASIO support you must not redistribute it due to the ASIO SDK licensing terms - see below.

Here's a brief blog post explaining why I needed ASIO and it includes a screen shot. But note, since writing that, I discovered my McMillen K-Mix digital interface mixer facilities alow routing of inputs 3 & 4 to the main outputs on 1 and 2 so can use the default MME Audacity build after all. For playback from PC, I found the HiFi Driver and ASIO Bridge from VB Audio lets me re-route PC audio out to channels 3 & 4 on the K-Mix, Leaving Channels 1 & 2 free for instruments and Mics.

Licensing

The reason for Audacity's lack of ASIO support is licensing, not technical. Steinberg do not alow the ASIO SDK to be redistributed (as required by open source projects). In addition, Audacity is GPL licensed and so is incompatible with the ASIO SDK licence redistribution rules.

Development PC

The script installs a set of development tools that are known to build Audacity. Due to the complex nature of such tools, any other versions of them on your PC may interfere with this script. Thus this scipt should be run on a clean PC without any developer tools. No support can be offered otherwise.

If you would rather not install these tools (Git for Windows, Visual Studio, CMake, Python and Conan), or you already have versions of them or even if you are having build problems, you can use a one of the following Vitual Machines:

  • Windows Sandbox - Sandbox can be enabled on Windows 10/11 Pro/Enterprise and can also be installed on Windows Home with a bit of effort. If the build experiences memory errors you will need a configuration file to provide more memory than the default 4GB.
  • A virtualisation program - install a VM and and a matching Developer Virtual Machine Image from Microsoft. In most cases VirtualBox will be a good choice (import the Microsoft supplied .ova appliance file but the Visual Studio pre installed in the VM must be uninstalled first to avoid problems).

In both cases you can copy the built files to where they will be run from on you PC file system, possibly by sharing a PC folder with the VM.

Step by Step Instructions

  • Ensure you have a PC (or VM) with Windows 10 or 11 installed.
  • Make a new folder C:\projects.
  • Click on the 'raw' button at the top of the script (below) in this Gist.
  • Use the browser Save As (right click) feature to save the script as This PC -> C:\projects\build-audacity.cmd. To avoid it being saved as a text file type the filename in quotes, eg "build-audacity.cmd".
  • open a new Windows cmd terminal (Windows + R keys and then type cmd)
  • Type cd \projects and enter key.
  • Install required tools and build by typing build-audacity.cmd and enter (use -v3.3.3 if requred).
    • Follow the prompts, pressing a key to start each tool's installer (when previous has finished).
    • NB for Visual Studio, make sure you check the "desktop development with C++" workload
    • If you have a non English Windows or Visual Studio then you must also install the English language packs.
  • Come back later - it will take at least 10 minutes.
  • Audactiy will be launched to test it was built correctly.
    • See the program location printed out at the end of the build so you can run it again.
    • Optionally copy the specified folder to where you want to run Audacity from, optionally renaming it.

(This video by @Renamesk walks you through the process, but the tool installation method has changed.)

If you have any ASIO drivers installed for active connected hardware you should find ASIO is now available in the the Audacity driver selection combo box which probably currently shows 'MME' selected (you may need to show using menu item View -> Toolbars -> Device toolbar).

NB: The Audacity settings and preferences are stored in a folder "Portable Settings" next to the audacity program. If you want to use settings in the user's home directory then delete this folder.

ko-fi

When things go wrong

As with any complex software build there are many moving parts (including Windows itself) and things can sometimes go wrong. Here are some tips if you hit build errors.

If everyhting falls or you just want to shortcut lots of painful debugging then try a Microsoft Windows Virtual machine (VM) as mentioned above.

  • make sure you have latest script
  • make sure you are in a folder C:\projects in the cmd window
  • ensure you are an administrator on your Windows 10 or 11 64 bit PC (ie not a organisational PC)?
  • run the script with --cleanall and try again
  • uninstall all the tools and installers (Python, cmake, Visual Studio) and then reboot before trying again
    • note having other versions of any of the tools installed may well cause problems - remove them
  • ensure you ticked the specified options when installing Visual Studio and Python, reinstall if unsure
  • read the error output - clues are often buried in reams of impenetrable text
  • disable any Anti Virus - the built-in Microsoft one is usually not a problem
  • if your PC is not English make sure you have EN language packs installed for Windows and VS

Thanks

  • @diogodh for finding and fixing the bug with conan installations
  • The Audacity team for an fantastic audio tool

ko-fi

@echo off
rem Version: 2.15.0
rem
rem See the following gist for details
rem https://gist.github.com/SteveALee/da24c2be633340b8791066dd98eb5d0b
rem
rem Options (only one may be specified)
rem
rem --install or none - install tools and build
rem --build - build, no install
rem --noget - build only but don't fetch again from git
rem --getonly - only get the files
rem --rebuild - cleanall and build
rem --clean - remove built files
rem --cleanall - remove fetched, built files and conan modules
rem --cleaninstall - remove downloaded installation files
rem -vj.m.p version - default is 3.7.5 (using conan 2.3.2) - limited due to dependencies
rem
rem MIT licence
rem [email protected]
TITLE Build Audacity with ASIO
setlocal
rem Clean up arguments
set TARGET=%1
set VERSION=%2
rem substring on empty var fails within parenthesis
if not [%TARGET%] == [] set TARGET_PREFIX=%TARGET:~0,2%
if [%TARGET_PREFIX%] == [-v] (
set TARGET=%2
set VERSION=%1
)
if [%TARGET%] == [] set TARGET=--install
if [%VERSION%] == [] (
set AUDACITY_REL=3.7.5
) else (
set AUDACITY_REL=%VERSION:~2%
)
set VISUALSTUDIOVER=2022\Community
set VISUALSTUDIOCMAKE=Visual Studio 17 2022
set VSDIR=%ProgramFiles%\Microsoft Visual Studio\%VISUALSTUDIOVER%
set PROJROOT=C:\projects
set AUDACITY=%PROJROOT%\audacity
set AUDACITY_BUILD=%PROJROOT%\audacity-asio
set MAKE_CONFIG=RelWithDebInfo
set EXEDIR=%AUDACITY_BUILD%\%MAKE_CONFIG%
set INSTALLFILEDIR=bin
rem More vaiables set for --install
if [%AUDACITY_REL:~0,3%] == [3.3] (set CONAN_VER=1.59.0) else (set CONAN_VER=2.11.0)
set CMAKE_OPTS=-DAUDACITY_BUILD_LEVEL=2 -Daudacity_has_asio_support=On
if [%AUDACITY_REL:~0,3%] GEQ [3.5] set CMAKE_OPTS=%CMAKE_OPTS% -Daudacity_has_audiocom_upload=On -Daudacity_has_networking=On -Daudacity_has_url_schemes_support=On
rem check projroot exists
if /I not [%~dp0] == [%PROJROOT%\] (
echo.
echo Error: This script must be run in %PROJROOT% - see %%PROJROOT%% in file
echo.
if not exist %PROJROOT% (
echo Create %PROJROOT
goto exit
) else (
echo cd to %PROJROOT%
goto exit
)
)
echo.
echo Building Audacity %AUDACITY_REL% 64 bit RelWithDebInfo with ASIO support...
echo.
rem Get tools
rem ANSI escape sequences do not work in if () block so we use goto
set git-url=https://github.com/git-for-windows/git/releases/download/v2.51.0.windows.1/Git-2.51.0-64-bit.exe
set GITPATH=%ProgramFiles%\Git\cmd\
set vs2022-url=https://aka.ms/vs/17/release/vs_community.exe
rem Conan is installed later
if [%CONAN_VER:~0,1%] == [1] (
rem Note Conan 1.59 has dependency issues with python 3.12
set python-url=https://www.python.org/ftp/python/3.11.0/python-3.11.0-amd64.exe
set PYTHONPATH=%LOCALAPPDATA%\Programs\Python\Python311\
) else (
set python-url=https://www.python.org/ftp/python/3.13.7/python-3.13.7-amd64.exe
set PYTHONPATH=%LOCALAPPDATA%\Programs\Python\Python313\
)
set PIPPATH=%PYTHONPATH%Scripts\
if not [%TARGET%] == [--install] if not [%TARGET%] == [--cleaninstall] goto clean
if [%TARGET%] == [--cleaninstall] echo Cleaning installation files... & rmdir /s/q %INSTALLFILEDIR% 2> :null & goto exit
echo   
echo.
echo Fetching tools..
echo 
mkdir %INSTALLFILEDIR% 2> :null
curl -L %git-url% -o %INSTALLFILEDIR%\g4w.exe
curl -L %vs2022-url% -o %INSTALLFILEDIR%\vs.exe
curl -L %python-url% -o %INSTALLFILEDIR%\python.exe
echo   
echo.
echo Installing tools...
echo.
echo IMPORTANT!! Follow the instructions below for each installer
echo Close each installer when it is done before starting next
echo.
echo Git for Windows
echo Choose the option "Git from the command line..."
pause
%INSTALLFILEDIR%\g4w.exe
echo.
echo Visual Studio: make sure you select the Workload "Desktop development with C++"
echo You can uncheck "Start After installation"
pause
%INSTALLFILEDIR%\vs.exe
echo.
echo Python: make sure you select "Add python.exe to PATH" for future access
pause
%INSTALLFILEDIR%\python.exe
echo.
echo.
echo 
set installing=true
call :clean --rebuild
goto exit
:clean
rem Python is on path, unless in windows sandbox
rem where /q python & if ERRORLEVEL 1 path %PATH%;%PYTHONPATH%
rem where /q pip & if ERRORLEVEL 1 path %PATH%;%PIPPATH%
rem where /q git & if ERRORLEVEL 1 path %PATH%;%GITPATH%
path %PYTHONPATH%;%PIPPATH%;%GITPATH%;%PATH%
if not [%TARGET%] == [--getonly] (
if /I [%TARGET%] == [--clean] echo Cleaning built files... & rmdir /s/q %AUDACITY_BUILD% 2> :null & goto exit
if /I [%TARGET%] == [--cleanall] call :cleanall & goto exit
if /I [%TARGET%] == [--rebuild] call :cleanall
)
goto skip
rem subroutine
:cleanall
echo Cleaning source and built files... & rmdir /s/q %AUDACITY% %AUDACITY_BUILD% 2> :null
where /q conan & if ERRORLEVEL 0 echo Cleaning conan cache... & conan remove -c "*" 2>&1 > :null
exit /B
:skip
rem Launch cmake-gui
rem VS doesn't include this with it's cmake
rem if [%TARGET%]==[--gui] cmake-gui -Daudacity_has_asio_support=On %CMAKE_OPTS% -S %AUDACITY% -B %AUDACITY_BUILD% & goto build
:checktools
rem ensure tools are installed
if not [%TARGET%] == [--noget] (
where /q git & if ERRORLEVEL 1 echo Git for Windows does not appear to be installed. Rerun with "--install" & goto exit /b
)
if not [%TARGET%] == [--getonly] (
if not exist "%VSDIR%\VC\Auxiliary\Build\vcvars64.bat" echo Visual Studio does not appear to be installed. Re run with "--install" & goto exit /b
if not defined VisualStudioVersion call "%VSDIR%\VC\Auxiliary\Build\vcvars64.bat"
where /q python & if ERRORLEVEL 1 echo Python does not appear to be installed. Open a new cmd window or re-run with "--install" & goto exit /b
where /q conan & if ERRORLEVEL 0 pip show --version conan | findstr /R /C:"Version: %CONAN_VER%" & if ERRORLEVEL 1 echo conan %CONAN_VER% not found & pip uninstall -y -q conan
where /q conan & if ERRORLEVEL 1 echo installing conan %CONAN_VER% & pip install conan==%CONAN_VER%
)
rem Get source code
:getcode
if /I not [%TARGET%] == [--clean] (
if /I not [%TARGET%] == [--cleanall] (
if /I not [%TARGET%] == [--noget] (
echo Fetching code for Audacity %AUDACITY_REL%...
echo.
git clone -b Audacity-%AUDACITY_REL% --depth 1 https://github.com/audacity/audacity/ %AUDACITY%
if ERRORLEVEL 1 echo Error: cannot fetch the Audacity code. Try the --cleanall or --noget options & goto exit
)
)
)
if /I [%TARGET%] == [--getonly] goto exit
if not exist %AUDACITY%\CMakeLists.txt echo The code files appear to be missing from %AUDACITY%. & goto exit
:cmake
cd %AUDACITY%
cmake.exe -G "%VISUALSTUDIOCMAKE%" -DCMAKE_CONFIGURATION_TYPES=%MAKE_CONFIG% %CMAKE_OPTS% -S %AUDACITY% -B %AUDACITY_BUILD% & if ERRORLEVEL 1 echo Error: Cannot create Audacity buildfiles & goto exit
:build
cd %AUDACITY_BUILD%
set msbuild="%VSDIR%\MSBuild\Current\Bin\MsBuild.exe"
%msbuild% ALL_BUILD.vcxproj -p:configuration=%MAKE_CONFIG%
if ERRORLEVEL 1 echo Error: cannot build Audacity & goto exit
rem Settings stored with files rather than home directory
rem See https://manual.audacityteam.org/man/portable_audacity.html
mkdir %EXEDIR%\"Portable Settings"
cd %PROJROOT%
rem All done
echo 
echo.
echo Congratulations!
echo Your new Audacity %AUDACITY_REL% with ASIO support will now launch.
echo The ASIO options will appear if you have ASIO drivers and connected hardware
echo In future just run the audacity.exe. No need to install.
echo.
echo %EXEDIR%\audacity.exe
echo.
echo Or copy the folder
echo.
echo %EXEDIR%\
echo.
echo and run the included audacity.exe
echo.
echo Note settings and preferences are stored in "%EXEDIR%\Portable Settings"
echo If you want to use settings in the user's home directory then delete this folder.
echo.
echo 
start %EXEDIR%\audacity.exe
if defined installing exit /B
:exit
cd %PROJROOT%
endlocal
@brunov99
Copy link

Thank you @SteveALee and the other contributors for this script, which has been a great help to me since version 3.7.
What do I need to do to make the script work with version 3.7.5? Just change the version number of this script? (and may be Conan version to 2.18.11) ?
Thank you for your help.

@SteveALee
Copy link
Author

SteveALee commented Aug 12, 2025

@brunov99 glad it's useful.

I didnt't spot the usual release announcement on the forum so have not looked yet.

Sure, try just bumping the build version number. As it's a patch update I doubt the build process changed.

From a quick scan of the release notes the most interesting thing for us here is flac 32bit.

@SteveALee
Copy link
Author

Updated to build Audacity 3.75 (plus updated Python, it for Windows and tested latest Visual Studio)

@brunov99
Copy link

@SteveALee Thank you very much. I am very grateful to you.
I use it in the broadcasting industry. From my point of view, it is the only software truly dedicated to voice production. Even though it now tends to want to resemble a DAW for making music.

@SteveALee
Copy link
Author

brunov99 I agree. It's a good simple choice (not simple enough for one use case I have though) I'm concerned that releases have been a little unreliable lately (since museScore). And wonder what version 4 will be like...

@sank1337
Copy link

sank1337 commented Aug 14, 2025

изображение what do i need to do? (im new to all thing like github or cmd or smth)

@SteveALee
Copy link
Author

SteveALee commented Aug 14, 2025

I dont know what smth is. This might not be something you want to attempt if it's too confusing. Are you running an cmd window as explained? In c:\projects folder? Windows 10 or 11? The problem seems to be it cannot find the tools which it downloads first. I suggest you explore why that might be.

@sank1337
Copy link

I dont know what smth is. This might not be something you want to attempt if it's too confusing. Are you running an cmd window as explained? In c:\projects folder? Windows 10 or 11?

i do all in the tutorial but this showed up in cmd, windows 10

@sank1337
Copy link

I dont know what smth is. This might not be something you want to attempt if it's too confusing. Are you running an cmd window as explained? In c:\projects folder? Windows 10 or 11? The problem seems to be it cannot find the tools which it downloads first. I suggest you explore why that might be.

изображение i do all in the tutorial second time and that is what i got

@SteveALee
Copy link
Author

Very strange. I updated my previous comment.

Make sure the 3 tool downloads occur before you press any keys when blue text shows

Let each installer run to completion before pressing another key.

I can't really think of anything else.

@SteveALee
Copy link
Author

Oh now i see the errors for the 3 downloads!!!!

Never seen and have no idea what that means. Something odd withbyour network settings? Suggest google.

@sank1337
Copy link

Are there any other ways to install ASIO in Audacity?
im waiting but nothin happens

@SteveALee
Copy link
Author

Not that i know of, other than manually follow the developer instructions that this script automates.

Try running the script with --cleanall before trying again and look for the very first error. It might help understand why the tools are not downloading and running

Is your pc free of any software development tools? If not then see insructions.

Good luck.

@sank1337
Copy link

The network is fine, but when the blue text appears, no processes even start.

Oh now i see the errors for the 3 downloads!!!!

Never seen and have no idea what that means. Something odd withbyour network settings? Suggest google.

@sank1337
Copy link

Oh now i see the errors for the 3 downloads!!!!

Never seen and have no idea what that means. Something odd withbyour network settings? Suggest google.

i think i will try smth tommorow, maybe i need to download all manually?

@SteveALee
Copy link
Author

So are they there? Somewhere else? If not try to figure why not.

@SteveALee
Copy link
Author

Like i said ive no idea what smth might be. Ive run out of things i can do to help. Sorry.

@sank1337
Copy link

Not that i know of, other than manually follow the developer instructions that this script automates.

Try running the script with --cleanall before trying again and look for the very first error. It might help understand why the tools are not downloading and running

Is your pc free of any software development tools? If not then see insructions.

Good luck.

OH I GOT SOMETHING DIFFERENT
изображение

@sank1337
Copy link

sank1337 commented Aug 14, 2025

Not that i know of, other than manually follow the developer instructions that this script automates.
Try running the script with --cleanall before trying again and look for the very first error. It might help understand why the tools are not downloading and running
Is your pc free of any software development tools? If not then see insructions.
Good luck.

OH I GOT SOMETHING DIFFERENT изображение

I think that i need to download conan, maybe

@SteveALee
Copy link
Author

No. It gets installed by the script but it never got that far.

Find out why the tool installers don't get dowloaded to the c:\projects\bin folder so they can be run.

@sank1337
Copy link

No. It gets installed by the script but it never got that far.

Find out why the tool installers don't get dowloaded to the c:\projects\bin folder so they can be run.

THX for help i will try something tomorrow

@Giermann
Copy link

Giermann commented Aug 15, 2025

@SteveALee I am not sure, but I guess with "smth" he just tried to abbreviate "something".

@sank1337 Error messages about certificates are often related to a wrong setting of the system clock, did you check your date and time settings?
Sadly it's months ago that I last used or modified Steve's Script - but your main problem seems to be "curl". I don't know if it is always included in Windows or which version you are running. Maybe you are already successful, if you just skip the certificate revocation (which fails according to the error message).

You can try to modify lines 99-101 and add the parameter "--ssl-no-revoke":

curl --ssl-no-revoke -L %git-url% -o %INSTALLFILEDIR%\g4w.exe
curl --ssl-no-revoke -L %vs2022-url% -o %INSTALLFILEDIR%\vs.exe
curl --ssl-no-revoke -L %python-url% -o %INSTALLFILEDIR%\python.exe

@SteveALee
Copy link
Author

@Giermann thanks very much! Very much appreciated as swamped right now.

In theory curl always comes with Win 10, 11. I checked but can't recall my source. Dunno about win ARM but I'm assuming not relevant here.

Is it possible another curl installed? Hence asking about any dev tools. Does it have permission to write to bin folder? Errors should be printed as

@sank1337
Copy link

@SteveALee I am not sure, but I guess with "smth" he just tried to abbreviate "something".

@sank1337 Error messages about certificates are often related to a wrong setting of the system clock, did you check your date and time settings? Sadly it's months ago that I last used or modified Steve's Script - but your main problem seems to be "curl". I don't know if it is always included in Windows or which version you are running. Maybe you are already successful, if you just skip the certificate revocation (which fails according to the error message).

You can try to modify lines 99-101 and add the parameter "--ssl-no-revoke":

curl --ssl-no-revoke -L %git-url% -o %INSTALLFILEDIR%\g4w.exe
curl --ssl-no-revoke -L %vs2022-url% -o %INSTALLFILEDIR%\vs.exe
curl --ssl-no-revoke -L %python-url% -o %INSTALLFILEDIR%\python.exe

Ye its workin thank you guys

@SteveALee
Copy link
Author

What fixed it? no-revoke?

@Giermann
Copy link

I think so, because the error was exactly "The revocation function was unable to check revocation for the certificate."

But I would not add this switch for everyone, as it reduces security.

@sank1337
Copy link

What fixed it? no-revoke?

Yes

@SteveALee
Copy link
Author

Great. I've never ever seen in years of curl use. Lol. As @Giermann said, is your system time off?

@SteveALee
Copy link
Author

But I would not add this switch for everyone, as it reduces security.

Defo not! It's indicative of a system problem IMHO.

Thanks again! Another happy ASIO user 😀

@SteveALee
Copy link
Author

Updated Python and Git for WIndows versions (Visual Studio is always latest)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment