-
-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
save audio packets as Opus files #1034
Comments
dealt with it like this now, its not beautiful I now and Im not proud but it works for now^^:
} |
Hello,
I have been trying to save audio packets as Opus files for several days now. The reason for this is that I would like to implement a wake word. Currently, my code looks like this:
using Org.BouncyCastle.Asn1.Cms;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using TSLib.Audio;
using TSLib.Full;
namespace TSLib.Audio.OpusTranscript
{
public class OpusTranscript
{
private int fileCount = 1;
private readonly string outputDirectory = "D:\output";
private readonly int OpusHeaderSize = 19;
private readonly List<byte[]> audioPackets = new List<byte[]>();
public void Initialize()
{
}
}
and I am accessing the packets directly from the PacketEvent in TS3FullClient. There might be a better solution, but after spending countless hours trying to go through the code, I decided to stick with accessing them directly from there.
The problem is that the Opus files generated from my code cannot be played, and I suspect that the issue lies in the Opus header. Could you please help me figure out what I need to change in order to generate valid Opus files?
Thank you very much.
The text was updated successfully, but these errors were encountered: