Weather Skald

Concept

Weather Skald is a whimsical but (somewhat) useful AI utility that reads the weather in a Viking style.

In the old Norse society of the Vikings, skalds were poets known for their skilled wordplay and vast knowledge of Norse mythology. The skalds composed clever poems to honor kings and nobles, and to commemorate heroic acts.

Although some modern poets have taken up the art, skaldic poetry is far less common these days. With Weather Skald, I answer the age-old question of what would happen if a down-on-his luck skald ended up as a modern weatherman. The result can be found in the nearby audio box.

This is the text read in the CoquiTTS sample:

In the frost-kissed breath of the giants, a chill sits at 58, fair gales dance like valkyries, and in the heavens, the moisture tangles about four score less a fifth. Odin's gaze is clear and stern on the seventh of the eleventh moon, touching earth warmly at 77, yet in the moon's light, he withdraws to a frosty 46. He remains unobstructed on the eagle's flight day, the eighth, with Freya's kiss still heated at 77, but her nighttime embrace gentled at 53. Thor's hammer clouts the clouds only slightly on the day of the serpent, the ninth, with his usual ardor of 75, but his hearth fire cools to a 56 come darkness. Rain clouds rally, heeding the call of the All-Father, their onslaught likely from the wolf's chase day, the tenth, to the raven's feast day, the twelfth, descending from a warm 68 to a cold bite of 47. Skadi's laughter might sprinkle frost on the thirteenth day, with her cool breath reaching 60 by day and a chilly 43 by moonrise. Balder grants us a partly veiled view of his beauty on the day of the horse, the fourteenth, moderating his warmth at 59, and his slumber's chill at 42. Finally, the day of the beast, the fifteenth, beckons rain once more, as the air's temper shuffles slightly between 58 and 44 under Odin's watchful eye.

This represents GPT-4’s best understanding of skaldic poetry as of December 2023. The text contains two key markers of the artform: clever worldplay and mythological allegory. It is perhaps a bit strong on the allegory for modern audiences not familiar with Norse mythology, but the result is still legible even to the uninitiated.

Technical details

Weather Skald is written in Python 3 and uses a three-stage process:

  1. Grabbing a weather forecast from a WeatherFlow weather station using their API

  2. Crafting a query which is sent to GPT-4 using OpenAI’s API

  3. The text returned by the OpenAI API call is fed into either OpenAI’s TTS service, or run locally via CoquiTTS to create the sound file

The WeatherFlow and OpenAI API calls simply make use of existing web services. In order to make the software usable on platforms that do not support CUDA or where local generation would not be feasible (for example the Raspberry Pi) I have added support for OpenAI’s TTS service. The results are less interesting, but servicable.

For local generation, CoquiTTS needs to run on a CUDA-enabled GPU. I used the XTTS v2 model, with a 23 minute sample of my own voice as a speaker. The sample above does not use any specific vocoder settings, instead relying on the default values. On an Nvidia 3080 12GB, the local TTS process takes approximately 2 minutes. The online process will of course depend on the current load on OpenAI’s servers.

The logo was generated using OpenAI’s DALL-E 3 model using their API.