{
    "tailapp": 2,
    "manifest": {
        "format": 2,
        "app_id": "dictate",
        "name": "Dictate",
        "version": 1,
        "schema": "tailapps/v0",
        "exported_at": 1795564590,
        "from": "gallery",
        "connections": [],
        "files": {
            "app.json": "cba31841a4c306e3141b1315793a0a93b8cbaf3aa4ed7a38a9e1863cc8262bd1"
        },
        "signature": "kLQ53SHkmBbakxAbQd3jU1KSAtngErCduPKW1jxlI4/IYdRNej70HKmMA9TXW97cu2olwiAAW/WC1Qk5CRloBQ==",
        "key_id": "gallery-1"
    },
    "app": {
        "schema": "tailapps/v0",
        "app": "dictate",
        "name": "Dictate",
        "description": "Hold a shortcut on the Mac (or tap Record on the iPhone), speak, let go: your words become text on your clipboard. Turn on Share and Sync to My Devices to see them on your other devices.",
        "icon": "mic",
        "version": 2,
        "permissions": [
            "mic.record",
            "speech.transcribe",
            "clipboard.write",
            "inbox:heard",
            "send:heard"
        ],
        "settings": {
            "share": {
                "type": "toggle",
                "label": "Share what I dictate with my other devices",
                "default": false
            }
        },
        "sources": {
            "incoming": {
                "inbox": "heard",
                "on_receive": "received"
            }
        },
        "state": {
            "listening": {
                "type": "bool",
                "default": false
            },
            "last": {
                "type": "text",
                "default": ""
            },
            "history": {
                "type": "list",
                "default": []
            }
        },
        "actions": {
            "listen": {
                "steps": [
                    {
                        "mic.record.start": {
                            "max_seconds": 120
                        }
                    },
                    {
                        "set": {
                            "listening": true
                        }
                    }
                ]
            },
            "transcribe": {
                "steps": [
                    {
                        "set": {
                            "listening": false
                        }
                    },
                    {
                        "mic.record.stop": [],
                        "as": "rec"
                    },
                    {
                        "speech.transcribe": "$rec.path",
                        "as": "heard"
                    },
                    {
                        "set": {
                            "last": "$heard.text"
                        }
                    },
                    {
                        "if": "$heard.text",
                        "then": [
                            {
                                "clipboard.write": {
                                    "text": "$heard.text"
                                }
                            },
                            {
                                "push": {
                                    "history": {
                                        "text": "$heard.text",
                                        "seconds": "$rec.seconds",
                                        "at": "$rec.at",
                                        "device": ""
                                    }
                                },
                                "max": 20
                            },
                            {
                                "if": "$settings.share",
                                "then": [
                                    {
                                        "send": {
                                            "heard": {
                                                "text": "$heard.text",
                                                "seconds": "$rec.seconds",
                                                "at": "$rec.at"
                                            }
                                        }
                                    }
                                ]
                            }
                        ]
                    }
                ]
            },
            "received": {
                "steps": [
                    {
                        "if": "$args.event.text",
                        "then": [
                            {
                                "push": {
                                    "history": {
                                        "text": "$args.event.text",
                                        "seconds": "$args.event.seconds",
                                        "at": "$args.event.at",
                                        "device": "$args.from"
                                    }
                                },
                                "max": 20
                            }
                        ]
                    }
                ]
            },
            "copy": {
                "args": {
                    "text": "text"
                },
                "steps": [
                    {
                        "clipboard.write": {
                            "text": "$args.text"
                        }
                    }
                ]
            },
            "clear": {
                "confirm": "Clear what you've dictated?",
                "steps": [
                    {
                        "set": {
                            "history": [],
                            "last": ""
                        }
                    }
                ]
            }
        },
        "cards": [
            {
                "id": "main",
                "layout": {
                    "column": [
                        {
                            "row": [
                                {
                                    "button": "Record",
                                    "on": "listen",
                                    "style": "primary",
                                    "when": "$listening | map:{true:false, else:true}",
                                    "disabled": "$running.transcribe"
                                },
                                {
                                    "button": "Stop and transcribe",
                                    "on": "transcribe",
                                    "style": "primary",
                                    "when": "$listening"
                                },
                                {
                                    "spacer": true
                                },
                                {
                                    "button": "Clear",
                                    "on": "clear",
                                    "style": "plain",
                                    "when": "$history"
                                }
                            ],
                            "align": "center"
                        },
                        {
                            "badge": "Turning speech into text",
                            "busy": true,
                            "tone": "accent",
                            "when": "$running.transcribe"
                        },
                        {
                            "text": "$last",
                            "lines": 6,
                            "when": "$last"
                        },
                        {
                            "text": "Hold \u2303\u2325D anywhere, speak, then let go. The text lands on your clipboard.",
                            "emphasis": "subtle",
                            "when": "$last | count | map:{0:true, else:false}",
                            "platforms": [
                                "macos"
                            ]
                        },
                        {
                            "text": "Tap Record, speak, then tap Stop. The text lands on your clipboard.",
                            "emphasis": "subtle",
                            "when": "$last | count | map:{0:true, else:false}",
                            "platforms": [
                                "ios"
                            ]
                        },
                        {
                            "list": "$history",
                            "limit": 5,
                            "item": {
                                "row": [
                                    {
                                        "column": [
                                            {
                                                "text": "$item.text",
                                                "lines": 2,
                                                "size": "s"
                                            },
                                            {
                                                "text": "from {$item.device}",
                                                "size": "xs",
                                                "emphasis": "subtle",
                                                "when": "$item.device"
                                            }
                                        ],
                                        "gap": "xs",
                                        "grow": true
                                    },
                                    {
                                        "button": "Copy",
                                        "on": "copy",
                                        "args": {
                                            "text": "$item.text"
                                        },
                                        "style": "plain"
                                    }
                                ]
                            }
                        }
                    ],
                    "gap": "m"
                }
            }
        ],
        "views": {
            "menubar": {
                "icon": "mic",
                "card": "main",
                "label": "$listening | map:{true:'Listening', else:''}",
                "label_tone": "$listening | map:{true:'bad', else:'neutral'}"
            },
            "floating": {
                "card": "main",
                "width": "narrow"
            }
        },
        "shortcuts": {
            "actions": {
                "listen": {
                    "keys": "ctrl+opt+d",
                    "scope": "global",
                    "on_release": "transcribe"
                }
            }
        }
    },
    "app_json": "{\n  \"schema\": \"tailapps/v0\",\n  \"app\": \"dictate\",\n  \"name\": \"Dictate\",\n  \"description\": \"Hold a shortcut on the Mac (or tap Record on the iPhone), speak, let go: your words become text on your clipboard. Turn on Share and Sync to My Devices to see them on your other devices.\",\n  \"icon\": \"mic\",\n  \"version\": 2,\n  \"permissions\": [\"mic.record\", \"speech.transcribe\", \"clipboard.write\", \"inbox:heard\", \"send:heard\"],\n  \"settings\": {\n    \"share\": { \"type\": \"toggle\", \"label\": \"Share what I dictate with my other devices\", \"default\": false }\n  },\n  \"sources\": {\n    \"incoming\": { \"inbox\": \"heard\", \"on_receive\": \"received\" }\n  },\n  \"state\": {\n    \"listening\": { \"type\": \"bool\", \"default\": false },\n    \"last\": { \"type\": \"text\", \"default\": \"\" },\n    \"history\": { \"type\": \"list\", \"default\": [] }\n  },\n  \"actions\": {\n    \"listen\": {\n      \"steps\": [\n        { \"mic.record.start\": { \"max_seconds\": 120 } },\n        { \"set\": { \"listening\": true } }\n      ]\n    },\n    \"transcribe\": {\n      \"steps\": [\n        { \"set\": { \"listening\": false } },\n        { \"mic.record.stop\": {}, \"as\": \"rec\" },\n        { \"speech.transcribe\": \"$rec.path\", \"as\": \"heard\" },\n        { \"set\": { \"last\": \"$heard.text\" } },\n        { \"if\": \"$heard.text\", \"then\": [\n          { \"clipboard.write\": { \"text\": \"$heard.text\" } },\n          { \"push\": { \"history\": { \"text\": \"$heard.text\", \"seconds\": \"$rec.seconds\", \"at\": \"$rec.at\", \"device\": \"\" } }, \"max\": 20 },\n          { \"if\": \"$settings.share\", \"then\": [\n            { \"send\": { \"heard\": { \"text\": \"$heard.text\", \"seconds\": \"$rec.seconds\", \"at\": \"$rec.at\" } } }\n          ] }\n        ] }\n      ]\n    },\n    \"received\": {\n      \"steps\": [\n        { \"if\": \"$args.event.text\", \"then\": [\n          { \"push\": { \"history\": { \"text\": \"$args.event.text\", \"seconds\": \"$args.event.seconds\", \"at\": \"$args.event.at\", \"device\": \"$args.from\" } }, \"max\": 20 }\n        ] }\n      ]\n    },\n    \"copy\": {\n      \"args\": { \"text\": \"text\" },\n      \"steps\": [\n        { \"clipboard.write\": { \"text\": \"$args.text\" } }\n      ]\n    },\n    \"clear\": {\n      \"confirm\": \"Clear what you've dictated?\",\n      \"steps\": [\n        { \"set\": { \"history\": [], \"last\": \"\" } }\n      ]\n    }\n  },\n  \"cards\": [{\n    \"id\": \"main\",\n    \"layout\": {\n      \"column\": [\n        { \"row\": [\n          { \"button\": \"Record\", \"on\": \"listen\", \"style\": \"primary\", \"when\": \"$listening | map:{true:false, else:true}\", \"disabled\": \"$running.transcribe\" },\n          { \"button\": \"Stop and transcribe\", \"on\": \"transcribe\", \"style\": \"primary\", \"when\": \"$listening\" },\n          { \"spacer\": true },\n          { \"button\": \"Clear\", \"on\": \"clear\", \"style\": \"plain\", \"when\": \"$history\" }\n        ], \"align\": \"center\" },\n        { \"badge\": \"Turning speech into text\", \"busy\": true, \"tone\": \"accent\", \"when\": \"$running.transcribe\" },\n        { \"text\": \"$last\", \"lines\": 6, \"when\": \"$last\" },\n        { \"text\": \"Hold \u2303\u2325D anywhere, speak, then let go. The text lands on your clipboard.\", \"emphasis\": \"subtle\", \"when\": \"$last | count | map:{0:true, else:false}\", \"platforms\": [\"macos\"] },\n        { \"text\": \"Tap Record, speak, then tap Stop. The text lands on your clipboard.\", \"emphasis\": \"subtle\", \"when\": \"$last | count | map:{0:true, else:false}\", \"platforms\": [\"ios\"] },\n        { \"list\": \"$history\", \"limit\": 5, \"item\": {\n          \"row\": [\n            { \"column\": [\n              { \"text\": \"$item.text\", \"lines\": 2, \"size\": \"s\" },\n              { \"text\": \"from {$item.device}\", \"size\": \"xs\", \"emphasis\": \"subtle\", \"when\": \"$item.device\" }\n            ], \"gap\": \"xs\", \"grow\": true },\n            { \"button\": \"Copy\", \"on\": \"copy\", \"args\": { \"text\": \"$item.text\" }, \"style\": \"plain\" }\n          ]\n        } }\n      ],\n      \"gap\": \"m\"\n    }\n  }],\n  \"views\": {\n    \"menubar\": { \"icon\": \"mic\", \"card\": \"main\", \"label\": \"$listening | map:{true:'Listening', else:''}\", \"label_tone\": \"$listening | map:{true:'bad', else:'neutral'}\" },\n    \"floating\": { \"card\": \"main\", \"width\": \"narrow\" }\n  },\n  \"shortcuts\": {\n    \"actions\": {\n      \"listen\": { \"keys\": \"ctrl+opt+d\", \"scope\": \"global\", \"on_release\": \"transcribe\" }\n    }\n  }\n}\n",
    "files": []
}