Jump to content

User:Addshore/Diagrams/Sequence/WikiSpeech 2019

From Wikitech

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"],
  "Python Speechoid API" [linecolor=blue, arclinecolor=blue, textbgcolor="#CCCCFF"],
  "disk" [linecolor=fuchsia, arclinecolor=fuchsia, textbgcolor="#FFCCFF"],
  "pronlex" [linecolor=blue, arclinecolor=blue, textbgcolor="#CCCCFF"],
  "sqlite" [linecolor=fuchsia, arclinecolor=fuchsia, textbgcolor="#FFCCFF"],
  "marytts" [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="getPageSegments"];
  "MW WikiSpeech JS" << "MW WikiSpeech API" [label="page segments"];
  
  "MW WikiSpeech JS" loop "marytts" [label="render segments", linecolor="grey", textcolor="black"] {

  "MW WikiSpeech JS" => "Python Speechoid API" [label="renderSegment"];
  "Python Speechoid API" => "pronlex" [label="get lex stuff"];
  "pronlex" => "sqlite" [label="db query"];
  "pronlex" << "sqlite" [label="result"];
  "Python Speechoid API" << "pronlex" [label="lex stuff"];
  "Python Speechoid API" => "marytts" [label="get data and audio"];
  "Python Speechoid API" << "marytts" [label="data and audio"];
  "Python Speechoid API" => "disk" [label="store audio"];
  "MW WikiSpeech JS" << "Python Speechoid API" [label="segment data & audio link"];
  };

    --- [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" [label="play files", linecolor="grey", textcolor="black"] {
  "MW WikiSpeech JS" => "Python Speechoid API" [label="Retrieve file"];
  "MW WikiSpeech JS" << "Python Speechoid API" [label="file"];
  "MW WikiSpeech JS" rbox "MW WikiSpeech JS" [label="Play audio" ];

  };
  

}