User:Addshore/Diagrams/Sequence/WikiSpeech 2020
Appearance
Renderable with https://mscgen.js.org/
msc{ width="1000"; "MW WikiSpeech JS"[linecolor=green, arclinecolor=green, textbgcolor="#50E983"], "MW WikiSpeech API" [linecolor=green, arclinecolor=green, textbgcolor="#50E983"], "Some storage or cache (cache? swift? sql?)" [linecolor=fuchsia, arclinecolor=fuchsia, textbgcolor="#FFCCFF"], "Speechoid API (Python)" [linecolor=blue, arclinecolor=blue, textbgcolor="#CCCCFF"], "Pronlex (Go)" [linecolor=blue, arclinecolor=blue, textbgcolor="#CCCCFF"], "mysql" [linecolor=fuchsia, arclinecolor=fuchsia, textbgcolor="#FFCCFF"], "MaryTTS (Java)" [linecolor=blue, arclinecolor=blue, textbgcolor="#CCCCFF"]; "MW WikiSpeech JS" rbox "MW WikiSpeech JS" [label="Page load while enabled" ]; "MW WikiSpeech JS" => "MW WikiSpeech API" [label="HTTP: getAllSegments"]; "MW WikiSpeech JS" << "MW WikiSpeech API" [label="All segments for page"]; "MW WikiSpeech JS" => "MW WikiSpeech API" [label="getSegment(1)"]; "MW WikiSpeech API" => "Some storage or cache (cache? swift? sql?)" [label="???: Check cache stuff"]; "MW WikiSpeech API" << "Some storage or cache (cache? swift? sql?)" [label="cached data or nothing"]; "MW WikiSpeech JS" << "MW WikiSpeech API" [label="(CACHED) early return"]; "MW WikiSpeech API" => "Speechoid API (Python)" [label="HTTP: (NOCACHE) render text in lang with voice"]; "Speechoid API (Python)" => "Pronlex (Go)" [label="HTTP: get lex stuff"]; "Pronlex (Go)" => "mysql" [label="SQL: DB select"]; "Pronlex (Go)" << "mysql" [label="result"]; "Speechoid API (Python)" << "Pronlex (Go)" [label="lex stuff"]; "Speechoid API (Python)" => "MaryTTS (Java)" [label="get data and audio"]; "Speechoid API (Python)" << "MaryTTS (Java)" [label="data and audio"]; "MW WikiSpeech API" << "Speechoid API (Python)" [label="data and audio"]; "MW WikiSpeech API" => "Some storage or cache (cache? swift? sql?)" [label="???: Store data and audio"]; "MW WikiSpeech JS" << "MW WikiSpeech API" [label="segment, data & audio link"]; "MW WikiSpeech JS" rbox "MW WikiSpeech JS" [label="The above will be looped as audio is played out" ]; --- [label="Wait for user input", linecolor="grey", textbgcolor="white", textcolor="black"]; "MW WikiSpeech JS" rbox "MW WikiSpeech JS" [label="Click play event" ]; "MW WikiSpeech JS" loop "MaryTTS (Java)" [label="play files", linecolor="grey", textcolor="black"] { "MW WikiSpeech JS" => "MW WikiSpeech API" [label="HTTP: Retrieve file for segment 1"]; "MW WikiSpeech API" => "Some storage or cache (cache? swift? sql?)" [label="???: Get from storage"]; "MW WikiSpeech API" << "Some storage or cache (cache? swift? sql?)" [label="file"]; "MW WikiSpeech JS" << "MW WikiSpeech API" [label="file"]; "MW WikiSpeech JS" rbox "MW WikiSpeech JS" [label="Play audio" ]; "MW WikiSpeech JS" => "MW WikiSpeech API" [label="getSegment(n+1)"]; }; }