Insert audio in PowerPoint Java

In various cases, the presenters use sounds or audio clips in their presentations. To include sounds in the presentations, MS PowerPoint provides audio frames. In this article, you are going to learn how to automate the manipulation of the audio frames. Particularly, the article will cover how to insert audio frames in PowerPoint PPT using Java. In addition, you will learn how to extract audio from PowerPoint PPT/PPTX programmatically.

Java API to Insert Audio Frames in PowerPoint PPT

To add or extract audio frames in presentations, we will use Aspose.Slides for Java. It is a feature-rich API that allows you to create and process PowerPoint and OpenOffice documents. Moreover, it lets you convert the presentations to other file formats. You can either install the API via Maven or download its JAR.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://repository.aspose.com/repo/</url>
</repository>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>21.9</version>
    <classifier>jdk16</classifier>
</dependency>

Insert an Audio Frame in PowerPoint PPT using Java

The following are the steps to insert audio into a PowerPoint PPT in Java.

The following code sample shows how to embed audio in a PowerPoint PPT in Java.

Extract Audio Frames in PowerPoint PPTX using Java

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 Java.

Java PowerPoint API to Embed Audio - Get a Free License

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

Conclusion

In this article, you have learned how to insert audio in PowerPoint PPT using Java. 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 Java. In addition, you can post your question to our forum.

See Also

Info: Using Aspose new MP4 to MP3 converter, you can easily extract the audio or sound from a video clip.