Ah is an adorable alpaca with albatross wings
achieving amazing aerial acrobatics in the air.
Baby Buh is a bear in a bubble bouncing blissfully
beneath bright blue balloons on a beautiful day.
Ca, the cautious caterpillar
consumes a creamy concoction in a cup
while Sa, the celebrated centipede,
ceaselessly sips cider in a citrus tree.
Duh, the darling dragon knows dinner first is right
But Duh, the darling dragon devours donuts with delight.
The elephant named Eh is an energetic educator with elk antlers.
Feh, the friendly fox, feasts with friends
at fancy fiestas in the forest.
Guh, the green gorilla, gleefully gobbles glistening grapes.
But his friend, Juh, the grumpy giraffe
gently groans and gripes when gazing at the green globs.
Huh, the happy hamster wears a hilarious hat while riding a horse.
Ih the interesting impala imagines icebergs.
Juh is a jazzy jaguar jubilant about juice.
Kuh is a kind kea keen on cavorting with kites.
Laughing loudly, Luh, the loquacious llama
lounges languidly in the lush, lively landscape.
Muh is a magical monkey majestically maneuvering massive mangoes in her mystic mountain meadow.
Nuh the nifty narwhal wears a necktie to eat noodles.
Oh, the obviously outrageous oyster loves her ostentatious opal.
Puh, the playful platypus presents his perfect present
on a plate: a prickly pickle.
Kwuh, the queen of the quokkas,
quadruples her questions quarterly.
Ruh is a ruby-powered rabbit
racing to rescue a robin from a rascally rhododendron.
Suh, the serene swan, spreads her snow-white wings,
showcasing her stunning splendor in the sunlight.
Tuh is a tremendous, totally tenacious tiger,
tearing through twisting, turning tunnels.
Uh is an unusual umbrella, underground with utensils,
unexpectedly united with unicorns.
Vuh, the vivacious vaquita, vigorously vanishes on vacation.
Wuh, is a wistful wallaby waltzing wonderfully,
wearing a wacky woolen waistcoat
while waving a wobbly wooden walking stick.
X, the excitable ax, expertly examined
the maximum exact extent of six extravagant xylophones.
Yuh, the yellowhammer,
yammers on about yummy yellow yogurt.
Zuh, the zealous zebu, zapped zany zinnias with zest.
I, Daniel Esplin, wrote this book to help my daughter learn her letter sounds before going to kindergarten.
AI was not as good as I had hoped at creating images of mixed-up or made-up animals.
I also couldn't get it to write decent poetry in the flowing cadence of Dr. Seuss.
But it was good at repeated use of a single letter in a sentence which should help solidify letter sounds, which was the original intent anyway.
The sounds the letters make was inspired by speakmethod.com but I used a simplified version.
I wrote this with vim as a single html page using a Boostrap carousel.
I wrote a couple bash scripts to access Amazon's AI models via the command line.
That way I didn't have to bother signing up for a new service and or bother with a GUI for downloading and organizing images.
One script generated sentences based on the current letter to start coming up with ideas.
The other script generated images based on a prompt.
I used some of the Fooocus prompts as a starting point.
#!/usr/bin/env bash
LETTER=$(basename "$PWD")
FILENAME="$LETTER.txt"
touch "$FILENAME"
echo >> "$FILENAME"
WORDS="Where possible prefer words that start with $LETTER or have $LETTER in them."
SENTENCE="Write 5 silly sentences with more than 15 words, each about a different animal that starts with $LETTER"
PROMPT="$SENTENCE $WORDS"
echo "$PROMPT" > text_prompt.txt
docker run --rm -ti -v ~/.aws:/root/.aws -v "$(pwd):/aws" amazon/aws-cli \
bedrock-runtime invoke-model \
--model-id arn:aws:bedrock:us-east-1:151862562105:inference-profile/us.meta.llama4-maverick-17b-instruct-v1:0 \
--body "{\"prompt\":\"$PROMPT\",\"max_gen_len\":512,\"temperature\":0.5,\"top_p\":0.9}" \
--cli-binary-format raw-in-base64-out \
--region us-east-1 \
out.txt
jq -r '.generation' out.txt >> "$FILENAME"
cat "$FILENAME"
#!/usr/bin/env bash
LETTER=$(basename "$PWD")
IDEA="happy male zebu with magical glowing horns. he stands in a field of zinnia flowers"
# So we can automatically name the files a1.jpg, a2.jpg, etc. without overwriting previous runs.
# shellcheck disable=SC2010
INDEX=$(ls -v | grep -oE '[0-9]+' | sort -n | tail -n 1)
((INDEX++))
TEXT="cute fantasy concept art of $IDEA. vibrant, cute, kawaii, studio anime, painterly, magical, fantasy art, cover art, cheerful, happy"
NEGATIVE="photographic, realistic, realism, 35mm film, dslr, cropped, frame, text, deformed, glitch, noise, noisy, off-center, deformed, cross-eyed, closed eyes, bad anatomy, ugly, disfigured, sloppy, duplicate, mutated, black and white"
echo "Generating images: $TEXT"
echo "$TEXT" > image_prompt.txt
docker run --rm -ti -v ~/.aws:/root/.aws -v "$(pwd):/aws" amazon/aws-cli \
bedrock-runtime invoke-model \
--model-id amazon.titan-image-generator-v2:0 \
--body "{\"textToImageParams\":{\"text\":\"$TEXT\",\"negativeText\":\"$NEGATIVE\"},\"taskType\":\"TEXT_IMAGE\",\"imageGenerationConfig\":{\"cfgScale\":8,\"seed\":0,\"width\":1024,\"height\":1024,\"numberOfImages\":4}}" \
--cli-binary-format raw-in-base64-out \
--region us-east-1 \
out.txt
jq -r '.images[0]' out.txt | base64 --decode > "${LETTER}${INDEX}.jpg"
((INDEX++))
jq -r '.images[1]' out.txt | base64 --decode > "${LETTER}${INDEX}.jpg"
((INDEX++))
jq -r '.images[2]' out.txt | base64 --decode > "${LETTER}${INDEX}.jpg"
((INDEX++))
jq -r '.images[3]' out.txt | base64 --decode > "${LETTER}${INDEX}.jpg"