II solved it by using ffmpeg now:

inputDeviceName := "Microphone (Realtek High Definition Audio)"
outputFile := strconv.Itoa(rand.Int()) +".mp3"//time.Now().String() + ".mp3"

cmd := exec.Command("C:/Dev/ffmpeg/bin/ffmpeg.exe", "-f","dshow", 
"-i","audio=" + inputDeviceName, outputFile)
//cmd := exec.Command("C:/Dev/ffmpeg/bin/ffmpeg.exe")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Stdin = os.Stdin
err := cmd.Start()
if err != nil {
println(err.Error())
}




Am Mittwoch, 21. September 2016 14:32:00 UTC+2 schrieb Dominik Link:
>
> Hi
>
> I'm currently writing a program which listens to a HID (sliders and 
> buttons) and controls a karaoke program with these inputs. Grabbing input 
> and sending commands with websockets work, but now I need to record the 
> audio output as well.
>
> I tried to compile and run portaudio, but I cannot install the golang 
> wrapper (https://github.com/gordonklaus/portaudio) as it always returns 
> with the following error: 
> "C:/Program 
> Files/mingw-w64/x86_64-5.3.0-posix-seh-rt_v4-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/5.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
>  
> cannot find -lportaudio
> collect2.exe: error: ld returned 1 exit status "
>
> Does anyone know a simple way to record audio output using go on Windows 
> 10? I don't want to tinker lots of hours to finally surrender anymore.
>
> Regards,
> Dominik
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to