🧑💻 Piero Angeling narrator.py and first part of documentation translation in italian
This commit is contained in:
parent
1174275b5b
commit
c953814fb9
20
README.md
20
README.md
|
@ -1,13 +1,19 @@
|
||||||
# David Attenborough narrates your life.
|
# Piero Angela racconta la tua vita.
|
||||||
|
|
||||||
https://twitter.com/charliebholtz/status/1724815159590293764
|
Questo è un fork del repo https://github.com/cbh123/narrator pubblicato per la prima volta da Charlie Bholtz su X (Twitter) con questo [post](https://twitter.com/charliebholtz/status/1724815159590293764)
|
||||||
|
Thank you Charlie for this simple but very fun iteration using OpenAi and Elevelabs APIs
|
||||||
|
|
||||||
## Want to make your own AI app?
|
Essendo un repository indirizzato esclusivamente all'utenza italiana ho deciso di tradurre le istruzioni.
|
||||||
Check out [Replicate](https://replicate.com). We make it easy to run machine learning models with an API.
|
|
||||||
|
[!NOTE]
|
||||||
|
Per poter usare questo repository dovrai creare una nuova voce narrante su Elevenlabs utilizzando un campione della voce di Piero Angela o del narratore che preferisci. Per comodità ho aggiunto un sample da usare per fare il training nella cartella `assets`
|
||||||
|
|
||||||
|
[!NOTE]
|
||||||
|
Non possiedo i diritti di utilizzo della voce di Piero, quindi questo progetto ha esclusivamente scopi divulgativi. Per me è stato un modo per far rivivere una voce amica che ha accompagnato i weekend della mia infanzia con SuperQuark. A lui devo in parte la passione per le scienze e per la cultura.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
Clone this repo, and setup and activate a virtualenv:
|
Clona questo repository, avvia il setup and attiva virtualenv:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
python3 -m pip install virtualenv
|
python3 -m pip install virtualenv
|
||||||
|
@ -15,10 +21,10 @@ python3 -m virtualenv venv
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, install the dependencies:
|
Installa le dipendenze:
|
||||||
`pip install -r requirements.txt`
|
`pip install -r requirements.txt`
|
||||||
|
|
||||||
Make a [Replicate](https://replicate.com), [OpenAI](https://beta.openai.com/), and [ElevenLabs](https://elevenlabs.io) account and set your tokens:
|
Se non ce li hai crea un account [OpenAI](https://beta.openai.com/) e [ElevenLabs](https://elevenlabs.io), poi recupera i tuoi auth token. Setta poi le variabili del tuo ambiente locale digitando
|
||||||
|
|
||||||
```
|
```
|
||||||
export OPENAI_API_KEY=<token>
|
export OPENAI_API_KEY=<token>
|
||||||
|
|
|
@ -60,8 +60,8 @@ def analyze_image(base64_image, script):
|
||||||
{
|
{
|
||||||
"role": "system",
|
"role": "system",
|
||||||
"content": """
|
"content": """
|
||||||
You are Sir David Attenborough. Narrate the picture of the human as if it is a nature documentary.
|
Sei Piero Angela. Narra ciò che fa l'essere umano nella foto come se fosse un documentario naturalistico.
|
||||||
Make it snarky and funny. Don't repeat yourself. Make it short. If I do anything remotely interesting, make a big deal about it!
|
Rendilo ironico e divertente. Non ripeterti. Rendilo breve. Se fa qualcosa di anche lontanamente interessante, sottolinealo con enfasi!
|
||||||
""",
|
""",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -84,10 +84,10 @@ def main():
|
||||||
base64_image = encode_image(image_path)
|
base64_image = encode_image(image_path)
|
||||||
|
|
||||||
# analyze posture
|
# analyze posture
|
||||||
print("👀 David is watching...")
|
print("👀 Piero ti sta guardando...")
|
||||||
analysis = analyze_image(base64_image, script=script)
|
analysis = analyze_image(base64_image, script=script)
|
||||||
|
|
||||||
print("🎙️ David says:")
|
print("🎙️ Piero dice:")
|
||||||
print(analysis)
|
print(analysis)
|
||||||
|
|
||||||
play_audio(analysis)
|
play_audio(analysis)
|
||||||
|
|
Loading…
Reference in New Issue