Skip to content

Commit

Permalink
Merge branch 'main' into ORDS-update-Jan2025-I
Browse files Browse the repository at this point in the history
ppaolucc-it authored Jan 28, 2025
2 parents 08a2f18 + 6d4a1c6 commit ef2896b
Showing 152 changed files with 2,275 additions and 558 deletions.
Original file line number Diff line number Diff line change
@@ -60,6 +60,8 @@ Identify the compartment you're currently working within. Navigate to 'Identity'
* Automatically a podcast script will be created and will generate the audio podcast using the Cindy and Bob voices
![alt text](generated.jpg)

## Notes
* It is important to note that, as of the time of writing this tutorial, the Speech-to-Text service is available exclusively in the Phoenix region.

## I hope you liked it.
Author: Jesús Brasero
69 changes: 62 additions & 7 deletions ai/ai-speech/podcast-generator/README.md
Original file line number Diff line number Diff line change
@@ -5,15 +5,70 @@ The application is designed to streamline podcast production through advanced AI
This application is built using Oracle Visual Builder Cloud Service (VBCS), a powerful low-code platform that simplifies development and accelerates the creation of robust applications without extensive coding. With this low-code approach, even complex workflows are straightforward to set up, allowing developers to focus on leveraging AI's potential for high-quality audio synthesis.
This AI-powered solution not only automates and optimizes the podcast creation process but also allows content creators to deliver professional audio content at scale efficiently.

Reviewed: 12.11.2024
Reviewed: 26.11.2024

# When to use this asset?

See the README document in the /files folder.

# How to use this asset?
# **1. Prepare your user**

In Oracle Cloud Infrastructure (OCI), API keys are used for secure authentication when accessing OCI resources through REST APIs. OCI API keys consist of two parts: a Public key and a Private key. You use the OCI console to generate the Private/Public key pair.
Generate API Keys using OCI Console
To Generate the API Keys using OCI Console:

- Login into your OCI Account.
![alt text]![alt text](Podcast-md/ak1.png)
- Click on the Profile icon at the top-right corner and select your Profile hyperlink.
![alt text](Podcast-md/ak2.png)
- Under Resources section at the bottom-left, select API Keys and then click Add API Key.
![alt text](Podcast-md/ak3.png)
- The Add API Key dialog is displayed. Select Generate API Key Pair to create a new key pair.
![alt text](Podcast-md/ak4.png)
- Click Download Private Key. A .pem file is saved to your local device. You do not need to download the public key and click Add button.
![alt text](Podcast-md/ak5.png)



# **2.Pick you compartment**
Identify the compartment you're currently working within. Navigate to 'Identity' -> 'Compartments'. Locate your compartment and make a note of its OCID (Oracle Cloud Identifier)

# **3.Open Visual Builder**
## Import Visual Builder project
* Open Visual Builder and click on the "Import" button. Choose "Application from file".
* Drop the zip project file
* Provide a name and an ID, for example "Podcast_Generator". Click on Import button.
![alt text](Podcast-md/import_project.jpg)

## Configure REST APIs authentication
* Open the recently created project.

See the README document in the /files folder.
* Click on Services button (left side) and click on "Backends"
![alt text](Podcast-md/services.jpg)

* Now, click on TTS, and Servers to edit server authentication.
![alt text](Podcast-md/edit_tts.jpg)

* Click the pencil to provide the OCI Crendentials
![alt text](Podcast-md/edit_tts_2.jpg)

* Provide the crendentials you got during the step 1.
![alt text](Podcast-md/signature.jpg)

* Repeat the same process with the GenAI backend.

## Provide your compartmentId
* Provide compartmentId default value in the project variable named "comparmentid" that you got during the step 2.
![alt text](Podcast-md/compartmentid.jpg)

# **4.Preview the application**
* Now can provide a topic in the text area and click "generate" button.
![alt text](Podcast-md/preview.jpg)

* Automatically a podcast script will be created and will generate the audio podcast using the Cindy and Bob voices
![alt text](Podcast-md/generated.jpg)

## Notes
* It is important to note that, as of the time of writing this tutorial, the Speech-to-Text service is available exclusively in the Phoenix region.

## I hope you liked it.
Author: Jesús Brasero

# License

38 changes: 38 additions & 0 deletions ai/ai-speech/podcast-generator/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Reporting security vulnerabilities

Oracle values the independent security research community and believes that
responsible disclosure of security vulnerabilities helps us ensure the security
and privacy of all our users.

Please do NOT raise a GitHub Issue to report a security vulnerability. If you
believe you have found a security vulnerability, please submit a report to
[secalert_us@oracle.com][1] preferably with a proof of concept. Please review
some additional information on [how to report security vulnerabilities to Oracle][2].
We encourage people who contact Oracle Security to use email encryption using
[our encryption key][3].

We ask that you do not use other channels or contact the project maintainers
directly.

Non-vulnerability related security issues including ideas for new or improved
security features are welcome on GitHub Issues.

## Security updates, alerts and bulletins

Security updates will be released on a regular cadence. Many of our projects
will typically release security fixes in conjunction with the
Oracle Critical Patch Update program. Additional
information, including past advisories, is available on our [security alerts][4]
page.

## Security-related information

We will provide security related information such as a threat model, considerations
for secure use, or any known security issues in our documentation. Please note
that labs and sample code are intended to demonstrate a concept and may not be
sufficiently hardened for production use.

[1]: mailto:secalert_us@oracle.com
[2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html
[3]: https://www.oracle.com/security-alerts/encryptionkey.html
[4]: https://www.oracle.com/security-alerts/
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion ai/generative-ai-service/README.md
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ Reviewed: 13.11.2024

## Reusable Assets Overview
- [Podcast Generator](https://github.com/oracle-devrel/technology-engineering/tree/main/ai/ai-speech/podcast-generator)

- [Decode Images and Videos with OCI GenAI](https://github.com/oracle-devrel/technology-engineering/tree/main/ai/generative-ai-service/decode-Images-and-Videos-with-OCI-GenAI)

# Useful Links

Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@

# Decode Images and Videos with OCI GenAI

This is an AI-powered application designed to unlock insights hidden within media files using the Oracle Cloud Infrastructure (OCI) Generative AI services. This application enables users to analyze images and videos, generating detailed summaries in multiple languages. Whether you are a content creator, researcher, or media enthusiast, this app helps you interpret visual content with ease.

<img src="./image.png">
</img>
---

## Features

### 🌍 **Multi-Language Support**
- Receive summaries in your preferred language, including:
- English, French, Arabic, Spanish, Italian, German, Portuguese, Japanese, Korean, and Chinese.

### 🎥 **Customizable Frame Processing for Videos**
- Extract video frames at user-defined intervals.
- Analyze specific frame ranges to tailor your results for precision.

### **Parallel Processing**
- Uses efficient parallel computation for quick and accurate frame analysis.

### 🖼️ **Image Analysis**
- Upload images to generate detailed summaries based on your input prompt.

### 🧠 **Cohesive Summaries**
- Combines individual frame insights to create a seamless, cohesive summary of the video’s overall theme, events, and key details.

---

## Technologies Used
- **[Streamlit](https://streamlit.io/):** For building an interactive user interface.
- **[Oracle Cloud Infrastructure (OCI) Generative AI](https://docs.oracle.com/en-us/iaas/Content/generative-ai/home.htm):** For powerful image and video content analysis.
- **[OpenCV](https://opencv.org/):** For video frame extraction and processing.
- **[Pillow (PIL)](https://pillow.readthedocs.io/):** For image handling and processing.
- **[tqdm](https://tqdm.github.io/):** For progress visualization in parallel processing.

---

## Installation

1. **Clone the repository:**


2. **Install dependencies:**
Make sure you have Python 3.8+ installed. Then, install the required libraries:
```bash
pip install -r requirements.txt
```

3. **Configure OCI:**
- Set up your OCI configuration by creating or updating the `~/.oci/config` file with your credentials and profile.
- Replace placeholders like `compartmentId`, `llm_service_endpoint`, and `visionModel` in the code with your actual values.

---

## Usage

1. **Run the application:**
```bash
streamlit run app.py
```

2. **Upload a file:**
- Use the sidebar to upload an image (`.png`, `.jpg`, `.jpeg`) or a video (`.mp4`, `.avi`, `.mov`).

3. **Set parameters:**
- For videos, adjust the frame extraction interval and select specific frame ranges for analysis.

4. **Analyze and summarize:**
- Enter a custom prompt to guide the AI in generating a meaningful summary.
- Choose the output language from the sidebar.

5. **Get results:**
- View detailed image summaries or cohesive video summaries directly in the app.

---

## Screenshots
### Image Analysis
<img src="./image2.png">
</img>

### Video Analysis
<img src="./image3.png">
</img>

---


## Acknowledgments
- Oracle Cloud Infrastructure Generative AI for enabling state-of-the-art visual content analysis.
- Open-source libraries like OpenCV, Pillow, and Streamlit for providing powerful tools to build this application.

---

## Contact
If you have questions or feedback, feel free to reach out via [anshuman.p.panda@oracle.com](mailto:email@example.com).
Loading

0 comments on commit ef2896b

Please sign in to comment.