Beginner => trying to use kinect service

Nov 13, 2013 at 5:33 PM
I am french and i am a beginner in C#.
kinect service is codeplex project made by Peekb. it send data from the kinect trough the network.
I am trying to use nspeex to encode audiostream for the kinect
I found a way to make it work without codec but there too much latency.
I would like to implement nspeek to the kinect service. It may be too difficult for me as i can find a good documentation where to start.
If someone can give a starting point to make my way with this code and with speex it will be great ..Or if someone else who is star on C # can spent 10 min to do it for me it will be better ;-)
Nov 13, 2013 at 5:36 PM
here is th code of kinect service :

// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see for details.
// All other rights reserved.

using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Kinect;
using NSpeex;

namespace Coding4Fun.Kinect.KinectService.Listeners
    public class AudioListener : KinectListener

        SpeexEncoder encoder = new SpeexEncoder(BandMode.Wide);
        private bool _running;

    public AudioListener(KinectSensor kinect, int port)
        VerifyConstructorArguments(kinect, port);

        this.Kinect = kinect;
        this.Port = port;

        Thread t = new Thread(AudioThread) { IsBackground = true };

    private void AudioThread()
        _running = true;

        byte[] buffer = new byte[4096];

        Stream kinectAudioStream = Kinect.AudioSource.Start();

            int count = kinectAudioStream.Read(buffer, 0, buffer.Length);

            Parallel.For(0, ClientList.Count, index =>
                SocketClient sc = ClientList[index];

                sc.Send(buffer, count);

Nov 16, 2013 at 9:36 AM
Ok i see...
Nov 16, 2013 at 9:51 AM
So let 's make NSPEEX step by step. my application is a WPF made with visual studio 2010

1) At first i have to have a reference to NSPEEX.DLL

2) And in a second time write in my code this sentence : " INCLUDE NSPEEX" ?

3) nothing else to include ?
Nov 16, 2013 at 10:36 AM
3 ) I guess i have to had a reference to Naudio. dll and write:
using NAudio.Wave;   //  need it
using NAudio.CoreAudioApi; // just in case of ?