Insert audio in PowerPoint C#

In various cases, the presenters include sounds or audio clips in their presentations. MS PowerPoint provides audio frames to insert the sounds into the slides. In this article, you will learn how to automate the manipulation of audio frames in presentations. Particularly, the article will cover how to add audio frames in PowerPoint PPT in C#. In addition, we will demonstrate how to extract audio frames from PPT slides.

C# API to Add Audio Frames in PowerPoint PPT

To add or extract audio frames in PowerPoint PPT/PPTX, we will use Aspose.Slides for .NET. It is a class library that lets you automate the creation and manipulation of PowerPoint and OpenOffice presentations. You can either install the API via NuGet or download its DLL.

PM> Install-Package Aspose.Slides.NET

Add an Audio Frame in PowerPoint PPT in C#

The following are the steps to add audio into a PowerPoint PPT using C#.

The following code sample shows how to insert audio in a PowerPoint PPTX in C#.

Extract Audio Frames in PowerPoint PPT in C#

You can also extract the audio frames from an existing PowerPoint PPT. The following are the steps to perform this operation.

The following code sample shows how to extract audio from a PowerPoint PPTX in C#.

C# PowerPoint API - Get a Free License

Use Aspose.Slides for .NET without evaluation limitations by getting a free temporary license.

Conclusion

In this article, you have learned how to insert audio in PowerPoint PPT using C#. Moreover, you have seen how to extract the audio clips from presentations programmatically. Besides, you can explore the documentation to learn more about Aspose.Slides for .NET. In addition, you can post your question to our forum.

See Also

Tip: If you ever need to extract the audio from a video clip, you can use Aspose MP4 to MP3 converter to do the job.