Skip to content

Instantly share code, notes, and snippets.

@lpabon
Created June 5, 2023 14:05
Show Gist options
  • Save lpabon/0dcbe97c146d4faf0fc84a4fc507fed0 to your computer and use it in GitHub Desktop.
Save lpabon/0dcbe97c146d4faf0fc84a4fc507fed0 to your computer and use it in GitHub Desktop.
Chatgpt help of ai presenter

Now in the yaml definition there are actors, locations, and scenes. actors have names, description, voice type, age, height. locations have type of outside, or inside, mountains, cabin, etc. Locations also have lighting. Scenes have actors in a location with multiple dialog

actors:
  - name: John Doe
    description: A charismatic detective
    voice_type: Baritone
    age: 35
    height: 6 feet

  - name: Jane Smith
    description: A brilliant scientist
    voice_type: Soprano
    age: 28
    height: 5 feet 8 inches

  - name: Michael Johnson
    description: A wise mentor
    voice_type: Bass
    age: 42
    height: 6 feet 2 inches

locations:
  - name: Mountains
    type: outside
    lighting: Daylight

  - name: Cabin
    type: inside
    lighting: Dim

scenes:
  - name: Crime Scene
    location: Cabin
    actors:
      - John Doe
      - Jane Smith
    dialogue:
      - actor: John Doe
        text: "I need to examine the evidence carefully."
      - actor: Jane Smith
        text: "Let's analyze the DNA samples."

  - name: Interrogation Room
    location: Cabin
    actors:
      - John Doe
      - Michael Johnson
    dialogue:
      - actor: John Doe
        text: "Tell me everything you know about the suspect."
      - actor: Michael Johnson
        text: "I'll use my negotiation skills to get the truth."

  - name: Laboratory
    location: Cabin
    actors:
      - Jane Smith
    dialogue:
      - actor: Jane Smith
        text: "I believe I've made a groundbreaking discovery."

In this updated YAML definition, the actors section contains the list of actors with their respective details including name, description, voice type, age, and height.

The locations section contains a list of locations with their name, type (inside or outside), and lighting information.

The scenes section now includes the name of the scene, the associated location, the list of actors involved in that scene, and the dialogue specific to that scene. Each dialogue entry includes the actor and their corresponding text.

Feel free to modify or expand upon this structure to include additional details or adapt it according to your specific requirements.

import yaml

# Read the YAML file
with open('actors_locations_scenes.yaml', 'r') as file:
    data = yaml.safe_load(file)

# Print the actors' information
print("Actors:")
for actor in data['actors']:
    print(f"Name: {actor['name']}")
    print(f"Description: {actor['description']}")
    print(f"Voice Type: {actor['voice_type']}")
    print(f"Age: {actor['age']}")
    print(f"Height: {actor['height']}")
    print()

# Print the locations' information
print("Locations:")
for location in data['locations']:
    print(f"Name: {location['name']}")
    print(f"Type: {location['type']}")
    print(f"Lighting: {location['lighting']}")
    print()

# Print the scenes' information
print("Scenes:")
for scene in data['scenes']:
    print(f"Scene: {scene['name']}")
    print(f"Location: {scene['location']}")
    print("Actors:")
    for actor in scene['actors']:
        print(f"- {actor}")
    print("Dialogue:")
    for dialogue in scene['dialogue']:
        print(f"Actor: {dialogue['actor']}")
        print(f"Text: {dialogue['text']}")
        print()
    print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment