microsoft / microsoft/psi

Help using ExportAudioToWavFileTask to export multiple audio streams as one .wav file

Open
#341 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
C#
Stars
574
Forks
104
Avg merge
19m
Merged PRs (30d)
1

Description

Hi, I'm using this teams bot to record call audio for multiple people in MS Teams. I've been able to export each stream to it's own .wav, but I want to export them all to one file that accurately recreates the audio from the teams call. I tried using ExportAudioToWaveFileTask but I am clearly using it wrong. Here's my code, which currently throws System.Exception: 'Stream specification not found: Audio' on the last line

        const string storeName = "test_audio";
        const string path = "C:\\\\store";
        string filePath = Path.Join(path, storeName);
        using Pipeline pipeline = Pipeline.Create();
        PsiStoreStreamReader reader = new PsiStoreStreamReader(storeName, path);
        PsiExporter exporter = PsiStore.Create(pipeline, $"{storeName}_temp", null, false, null);
        var streams = reader.AvailableStreams;
        Dataset dataset = Dataset.CreateAsync(reader).Result;
        dataset.AddSessionAsync(reader);
        ExportAudioToWavFileTask task = new ExportAudioToWavFileTask{};
        var config = new ExportAudioToWavFileTaskConfiguration();
        SessionImporter sessionImporter = SessionImporter.Open(pipeline, dataset.Sessions.First());
        
        task.Run(pipeline, sessionImporter, exporter, config);

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ExportAudioToWavFileTask API documentation and the Microsoft Graph PsiBot sample, then inspect the ExportAudioToWavFileTaskConfiguration and SessionImporter usage in the provided code. Determine how the audio stream specification should represent multiple streams; done means the task exports them as one WAV file without the “Stream specification not found: Audio” exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
audio-video-rtc, stream-processing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.