{
  "schema_version": "1.0",
  "nodes": [
    {
      "id": "language",
      "type": "input/text",
      "label": "Visitor's language",
      "parameters": {
        "text": "Italiano",
        "multiline": false,
        "required": true
      }
    },
    {
      "id": "script",
      "type": "input/text",
      "label": "Curator's text",
      "parameters": {
        "text": "Girl with a Pearl Earring, painted by Johannes Vermeer around 1665, oil on canvas, 44.5 by 39 centimetres. Mauritshuis, The Hague.\n\nThis is not a portrait of a known person. It is a tronie, a Dutch study of a face, a type or an expression, and nobody knows who posed for it.\n\nThe turban is painted with ultramarine, a blue made from ground lapis lazuli that cost more than gold. The pearl is little more than two strokes of paint: a bright highlight above and a soft reflection of the white collar below. It is probably too large to be a real pearl, and may be polished glass or tin.\n\nA study by the Mauritshuis in 2018 found tiny eyelashes, invisible to the naked eye, and showed that the dark background was once a green curtain whose paint has faded over the centuries.\n\nShe turns towards us, lips parted, as if we had just called her name.",
        "multiline": true,
        "required": true
      }
    },
    {
      "id": "code_en",
      "type": "utility/constant",
      "label": "English",
      "parameters": {
        "type": "text",
        "value": "en"
      }
    },
    {
      "id": "code_it",
      "type": "utility/constant",
      "label": "Italian",
      "parameters": {
        "type": "text",
        "value": "it"
      }
    },
    {
      "id": "code_fr",
      "type": "utility/constant",
      "label": "French",
      "parameters": {
        "type": "text",
        "value": "fr"
      }
    },
    {
      "id": "code_de",
      "type": "utility/constant",
      "label": "German",
      "parameters": {
        "type": "text",
        "value": "de"
      }
    },
    {
      "id": "code_es",
      "type": "utility/constant",
      "label": "Spanish",
      "parameters": {
        "type": "text",
        "value": "es"
      }
    },
    {
      "id": "normalize",
      "type": "utility/select_by_key",
      "label": "Supported language",
      "parameters": {
        "selectionConfig": {
          "valueType": "text",
          "onNoMatch": "use_default",
          "caseSensitive": false,
          "cases": [
            {
              "key": "en",
              "inputPort": "alias_1",
              "label": "en → en"
            },
            {
              "key": "english",
              "inputPort": "alias_2",
              "label": "english → en"
            },
            {
              "key": "it",
              "inputPort": "alias_3",
              "label": "it → it"
            },
            {
              "key": "italiano",
              "inputPort": "alias_4",
              "label": "italiano → it"
            },
            {
              "key": "italian",
              "inputPort": "alias_5",
              "label": "italian → it"
            },
            {
              "key": "fr",
              "inputPort": "alias_6",
              "label": "fr → fr"
            },
            {
              "key": "français",
              "inputPort": "alias_7",
              "label": "français → fr"
            },
            {
              "key": "francais",
              "inputPort": "alias_8",
              "label": "francais → fr"
            },
            {
              "key": "french",
              "inputPort": "alias_9",
              "label": "french → fr"
            },
            {
              "key": "de",
              "inputPort": "alias_10",
              "label": "de → de"
            },
            {
              "key": "deutsch",
              "inputPort": "alias_11",
              "label": "deutsch → de"
            },
            {
              "key": "german",
              "inputPort": "alias_12",
              "label": "german → de"
            },
            {
              "key": "es",
              "inputPort": "alias_13",
              "label": "es → es"
            },
            {
              "key": "español",
              "inputPort": "alias_14",
              "label": "español → es"
            },
            {
              "key": "spanish",
              "inputPort": "alias_15",
              "label": "spanish → es"
            }
          ]
        }
      }
    },
    {
      "id": "is_en",
      "type": "utility/predicate",
      "label": "Is English",
      "parameters": {
        "operation": "equals",
        "compare_text": "en"
      }
    },
    {
      "id": "only_en",
      "type": "utility/filter",
      "label": "Only English",
      "parameters": {
        "invert": false
      }
    },
    {
      "id": "write_en",
      "type": "ai/text_generation",
      "label": "Narration in English",
      "parameters": {
        "system_prompt": "You write the narration of a museum audio guide in English. Rewrite the curator's text for listening, not reading: short sentences, a warm, calm voice speaking to one visitor standing in front of the painting. Keep every fact exactly as given — dates, sizes, names, materials — and add none. Do not mention the curator or that this is an adaptation. Between 110 and 150 words. Plain text only: no headings, no lists, no stage directions, no quotation marks around the whole text.",
        "temperature": 0.5,
        "max_tokens": 2000
      },
      "model": {
        "model": "gpt-5.6-luna",
        "params": {
          "reasoning_effort": "low",
          "max_tokens": 2000
        }
      }
    },
    {
      "id": "voice_en",
      "type": "ai/text_to_speech",
      "label": "Voice in English",
      "parameters": {},
      "model": {
        "model": "elevenlabs-turbo-v2.5",
        "params": {
          "voice": "Rachel",
          "stability": 0.55,
          "apply_text_normalization": "auto",
          "timestamps": false
        }
      }
    },
    {
      "id": "is_it",
      "type": "utility/predicate",
      "label": "Is Italian",
      "parameters": {
        "operation": "equals",
        "compare_text": "it"
      }
    },
    {
      "id": "only_it",
      "type": "utility/filter",
      "label": "Only Italian",
      "parameters": {
        "invert": false
      }
    },
    {
      "id": "write_it",
      "type": "ai/text_generation",
      "label": "Narration in Italian",
      "parameters": {
        "system_prompt": "You write the narration of a museum audio guide in Italian. Rewrite the curator's text for listening, not reading: short sentences, a warm, calm voice speaking to one visitor standing in front of the painting. Keep every fact exactly as given — dates, sizes, names, materials — and add none. Do not mention the curator or that this is an adaptation. Between 110 and 150 words. Plain text only: no headings, no lists, no stage directions, no quotation marks around the whole text.",
        "temperature": 0.5,
        "max_tokens": 2000
      },
      "model": {
        "model": "gpt-5.6-luna",
        "params": {
          "reasoning_effort": "low",
          "max_tokens": 2000
        }
      }
    },
    {
      "id": "voice_it",
      "type": "ai/text_to_speech",
      "label": "Voice in Italian",
      "parameters": {},
      "model": {
        "model": "elevenlabs-turbo-v2.5",
        "params": {
          "voice": "Rachel",
          "stability": 0.55,
          "apply_text_normalization": "auto",
          "timestamps": false
        }
      }
    },
    {
      "id": "is_fr",
      "type": "utility/predicate",
      "label": "Is French",
      "parameters": {
        "operation": "equals",
        "compare_text": "fr"
      }
    },
    {
      "id": "only_fr",
      "type": "utility/filter",
      "label": "Only French",
      "parameters": {
        "invert": false
      }
    },
    {
      "id": "write_fr",
      "type": "ai/text_generation",
      "label": "Narration in French",
      "parameters": {
        "system_prompt": "You write the narration of a museum audio guide in French. Rewrite the curator's text for listening, not reading: short sentences, a warm, calm voice speaking to one visitor standing in front of the painting. Keep every fact exactly as given — dates, sizes, names, materials — and add none. Do not mention the curator or that this is an adaptation. Between 110 and 150 words. Plain text only: no headings, no lists, no stage directions, no quotation marks around the whole text.",
        "temperature": 0.5,
        "max_tokens": 2000
      },
      "model": {
        "model": "gpt-5.6-luna",
        "params": {
          "reasoning_effort": "low",
          "max_tokens": 2000
        }
      }
    },
    {
      "id": "voice_fr",
      "type": "ai/text_to_speech",
      "label": "Voice in French",
      "parameters": {},
      "model": {
        "model": "elevenlabs-turbo-v2.5",
        "params": {
          "voice": "Rachel",
          "stability": 0.55,
          "apply_text_normalization": "auto",
          "timestamps": false
        }
      }
    },
    {
      "id": "is_de",
      "type": "utility/predicate",
      "label": "Is German",
      "parameters": {
        "operation": "equals",
        "compare_text": "de"
      }
    },
    {
      "id": "only_de",
      "type": "utility/filter",
      "label": "Only German",
      "parameters": {
        "invert": false
      }
    },
    {
      "id": "write_de",
      "type": "ai/text_generation",
      "label": "Narration in German",
      "parameters": {
        "system_prompt": "You write the narration of a museum audio guide in German. Rewrite the curator's text for listening, not reading: short sentences, a warm, calm voice speaking to one visitor standing in front of the painting. Keep every fact exactly as given — dates, sizes, names, materials — and add none. Do not mention the curator or that this is an adaptation. Between 110 and 150 words. Plain text only: no headings, no lists, no stage directions, no quotation marks around the whole text.",
        "temperature": 0.5,
        "max_tokens": 2000
      },
      "model": {
        "model": "gpt-5.6-luna",
        "params": {
          "reasoning_effort": "low",
          "max_tokens": 2000
        }
      }
    },
    {
      "id": "voice_de",
      "type": "ai/text_to_speech",
      "label": "Voice in German",
      "parameters": {},
      "model": {
        "model": "elevenlabs-turbo-v2.5",
        "params": {
          "voice": "Rachel",
          "stability": 0.55,
          "apply_text_normalization": "auto",
          "timestamps": false
        }
      }
    },
    {
      "id": "is_es",
      "type": "utility/predicate",
      "label": "Is Spanish",
      "parameters": {
        "operation": "equals",
        "compare_text": "es"
      }
    },
    {
      "id": "only_es",
      "type": "utility/filter",
      "label": "Only Spanish",
      "parameters": {
        "invert": false
      }
    },
    {
      "id": "write_es",
      "type": "ai/text_generation",
      "label": "Narration in Spanish",
      "parameters": {
        "system_prompt": "You write the narration of a museum audio guide in Spanish. Rewrite the curator's text for listening, not reading: short sentences, a warm, calm voice speaking to one visitor standing in front of the painting. Keep every fact exactly as given — dates, sizes, names, materials — and add none. Do not mention the curator or that this is an adaptation. Between 110 and 150 words. Plain text only: no headings, no lists, no stage directions, no quotation marks around the whole text.",
        "temperature": 0.5,
        "max_tokens": 2000
      },
      "model": {
        "model": "gpt-5.6-luna",
        "params": {
          "reasoning_effort": "low",
          "max_tokens": 2000
        }
      }
    },
    {
      "id": "voice_es",
      "type": "ai/text_to_speech",
      "label": "Voice in Spanish",
      "parameters": {},
      "model": {
        "model": "elevenlabs-turbo-v2.5",
        "params": {
          "voice": "Rachel",
          "stability": 0.55,
          "apply_text_normalization": "auto",
          "timestamps": false
        }
      }
    },
    {
      "id": "narration",
      "type": "utility/select_by_key",
      "label": "Narration",
      "parameters": {
        "selectionConfig": {
          "valueType": "text",
          "onNoMatch": "fail",
          "caseSensitive": true,
          "cases": [
            {
              "key": "en",
              "inputPort": "en",
              "label": "English"
            },
            {
              "key": "it",
              "inputPort": "it",
              "label": "Italian"
            },
            {
              "key": "fr",
              "inputPort": "fr",
              "label": "French"
            },
            {
              "key": "de",
              "inputPort": "de",
              "label": "German"
            },
            {
              "key": "es",
              "inputPort": "es",
              "label": "Spanish"
            }
          ]
        }
      }
    },
    {
      "id": "audio",
      "type": "utility/select_by_key",
      "label": "Audio",
      "parameters": {
        "selectionConfig": {
          "valueType": "audio",
          "onNoMatch": "fail",
          "caseSensitive": true,
          "cases": [
            {
              "key": "en",
              "inputPort": "en",
              "label": "English"
            },
            {
              "key": "it",
              "inputPort": "it",
              "label": "Italian"
            },
            {
              "key": "fr",
              "inputPort": "fr",
              "label": "French"
            },
            {
              "key": "de",
              "inputPort": "de",
              "label": "German"
            },
            {
              "key": "es",
              "inputPort": "es",
              "label": "Spanish"
            }
          ]
        }
      }
    },
    {
      "id": "out_audio",
      "type": "output/audio",
      "label": "Audio guide",
      "parameters": {
        "output_name": "audio_guide"
      }
    },
    {
      "id": "out_text",
      "type": "output/text",
      "label": "Narration",
      "parameters": {
        "output_name": "narration"
      }
    },
    {
      "id": "out_language",
      "type": "output/text",
      "label": "Language",
      "parameters": {
        "output_name": "language"
      }
    },
    {
      "id": "out_default",
      "type": "output/json",
      "label": "Fell back to English",
      "parameters": {
        "output_name": "used_default"
      }
    }
  ],
  "connections": [
    {
      "from_node": "language",
      "from_output": "text",
      "to_node": "normalize",
      "to_input": "selector"
    },
    {
      "from_node": "code_en",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "default_value"
    },
    {
      "from_node": "code_en",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_1"
    },
    {
      "from_node": "code_en",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_2"
    },
    {
      "from_node": "code_it",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_3"
    },
    {
      "from_node": "code_it",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_4"
    },
    {
      "from_node": "code_it",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_5"
    },
    {
      "from_node": "code_fr",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_6"
    },
    {
      "from_node": "code_fr",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_7"
    },
    {
      "from_node": "code_fr",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_8"
    },
    {
      "from_node": "code_fr",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_9"
    },
    {
      "from_node": "code_de",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_10"
    },
    {
      "from_node": "code_de",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_11"
    },
    {
      "from_node": "code_de",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_12"
    },
    {
      "from_node": "code_es",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_13"
    },
    {
      "from_node": "code_es",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_14"
    },
    {
      "from_node": "code_es",
      "from_output": "value",
      "to_node": "normalize",
      "to_input": "alias_15"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "is_en",
      "to_input": "a"
    },
    {
      "from_node": "is_en",
      "from_output": "result",
      "to_node": "only_en",
      "to_input": "condition"
    },
    {
      "from_node": "script",
      "from_output": "text",
      "to_node": "only_en",
      "to_input": "value"
    },
    {
      "from_node": "only_en",
      "from_output": "value",
      "to_node": "write_en",
      "to_input": "prompt"
    },
    {
      "from_node": "write_en",
      "from_output": "result",
      "to_node": "voice_en",
      "to_input": "text"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "is_it",
      "to_input": "a"
    },
    {
      "from_node": "is_it",
      "from_output": "result",
      "to_node": "only_it",
      "to_input": "condition"
    },
    {
      "from_node": "script",
      "from_output": "text",
      "to_node": "only_it",
      "to_input": "value"
    },
    {
      "from_node": "only_it",
      "from_output": "value",
      "to_node": "write_it",
      "to_input": "prompt"
    },
    {
      "from_node": "write_it",
      "from_output": "result",
      "to_node": "voice_it",
      "to_input": "text"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "is_fr",
      "to_input": "a"
    },
    {
      "from_node": "is_fr",
      "from_output": "result",
      "to_node": "only_fr",
      "to_input": "condition"
    },
    {
      "from_node": "script",
      "from_output": "text",
      "to_node": "only_fr",
      "to_input": "value"
    },
    {
      "from_node": "only_fr",
      "from_output": "value",
      "to_node": "write_fr",
      "to_input": "prompt"
    },
    {
      "from_node": "write_fr",
      "from_output": "result",
      "to_node": "voice_fr",
      "to_input": "text"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "is_de",
      "to_input": "a"
    },
    {
      "from_node": "is_de",
      "from_output": "result",
      "to_node": "only_de",
      "to_input": "condition"
    },
    {
      "from_node": "script",
      "from_output": "text",
      "to_node": "only_de",
      "to_input": "value"
    },
    {
      "from_node": "only_de",
      "from_output": "value",
      "to_node": "write_de",
      "to_input": "prompt"
    },
    {
      "from_node": "write_de",
      "from_output": "result",
      "to_node": "voice_de",
      "to_input": "text"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "is_es",
      "to_input": "a"
    },
    {
      "from_node": "is_es",
      "from_output": "result",
      "to_node": "only_es",
      "to_input": "condition"
    },
    {
      "from_node": "script",
      "from_output": "text",
      "to_node": "only_es",
      "to_input": "value"
    },
    {
      "from_node": "only_es",
      "from_output": "value",
      "to_node": "write_es",
      "to_input": "prompt"
    },
    {
      "from_node": "write_es",
      "from_output": "result",
      "to_node": "voice_es",
      "to_input": "text"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "narration",
      "to_input": "selector"
    },
    {
      "from_node": "write_en",
      "from_output": "result",
      "to_node": "narration",
      "to_input": "en"
    },
    {
      "from_node": "write_it",
      "from_output": "result",
      "to_node": "narration",
      "to_input": "it"
    },
    {
      "from_node": "write_fr",
      "from_output": "result",
      "to_node": "narration",
      "to_input": "fr"
    },
    {
      "from_node": "write_de",
      "from_output": "result",
      "to_node": "narration",
      "to_input": "de"
    },
    {
      "from_node": "write_es",
      "from_output": "result",
      "to_node": "narration",
      "to_input": "es"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "audio",
      "to_input": "selector"
    },
    {
      "from_node": "voice_en",
      "from_output": "audio",
      "to_node": "audio",
      "to_input": "en"
    },
    {
      "from_node": "voice_it",
      "from_output": "audio",
      "to_node": "audio",
      "to_input": "it"
    },
    {
      "from_node": "voice_fr",
      "from_output": "audio",
      "to_node": "audio",
      "to_input": "fr"
    },
    {
      "from_node": "voice_de",
      "from_output": "audio",
      "to_node": "audio",
      "to_input": "de"
    },
    {
      "from_node": "voice_es",
      "from_output": "audio",
      "to_node": "audio",
      "to_input": "es"
    },
    {
      "from_node": "audio",
      "from_output": "selected_value",
      "to_node": "out_audio",
      "to_input": "audio"
    },
    {
      "from_node": "narration",
      "from_output": "selected_value",
      "to_node": "out_text",
      "to_input": "text"
    },
    {
      "from_node": "normalize",
      "from_output": "selected_value",
      "to_node": "out_language",
      "to_input": "text"
    },
    {
      "from_node": "normalize",
      "from_output": "used_default",
      "to_node": "out_default",
      "to_input": "json"
    }
  ]
}
