Audio Frame

Create Audio Frame

Aspose.Slides for .NET allows developers to add audio files in their slides. These audio files are embedded in the slides as Audio Frames . An Audio Frame contains the embedded audio file. In this topic, we will discuss that how can developers embed audio frames in their slides using Aspose.Slides for .NET . To add an Embedded Audio Frame in a slide using Aspose.Slides for .NET , please follow the steps below:

  • Create an instance of Presentation class
  • Obtain the reference of a slide by using its Index
  • Open the Audio File Stream to be embedded in the slide
  • Add the Embedded Audio Frame (containing audio file) into the slide
  • Set PlayMode and Volume exposed by IAudioFrame object
  • Write the modified presentation as a PPTX file

In the example given below, we have added an Embedded Audio Frame into the slide.

Extract Audio

Aspose.Slides for .NET allows developers to extract the sound that is used in slide show transitions associated with slides. To extract the audio, please follow the steps below:

  • Create an instance of Presentation class and load the presentation with slide transitions
  • Access the desired slide
  • Access the slideshow transitions for slide
  • Extract the sound in byte data