Skip to content

Instantly share code, notes, and snippets.

@anandwana001
Last active August 25, 2021 10:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anandwana001/e9c68fe2901ed2a9afec48c7cfa617e3 to your computer and use it in GitHub Desktop.
Save anandwana001/e9c68fe2901ed2a9afec48c7cfa617e3 to your computer and use it in GitHub Desktop.
id: "17"
title: "Audio Test"
init_state_name: "Introduction"
states {
key: "Finish"
value {
content {
content_id: "content"
html: "<p>Congratulations, you have finished!</p>"
}
recorded_voiceovers {
voiceover_language_mapping {
key: "content"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "test_audio_2_en.mp3"
file_size_bytes: 59289
}
}
voiceover_content_mapping {
key: "hi-en"
value {
filename: "test_audio_2_hi_en.mp3"
file_size_bytes: 88905
}
}
}
}
}
}
}
states {
key: "Introduction"
value {
content {
content_id: "content"
html: "<p>Try clicking on the speaker! After listening, click continue.</p>"
}
recorded_voiceovers {
voiceover_language_mapping {
key: "ca_buttonText_0"
value {
}
}
voiceover_language_mapping {
key: "content"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "test_audio_1_en.mp3"
file_size_bytes: 95426
}
}
voiceover_content_mapping {
key: "hi-en"
value {
filename: "test_audio_1_hi_en.mp3"
file_size_bytes: 132719
}
}
}
}
voiceover_language_mapping {
key: "default_outcome"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "test_audio_1_en.mp3"
file_size_bytes: 95426
}
}
voiceover_content_mapping {
key: "hi-en"
value {
filename: "test_audio_1_hi_en.mp3"
file_size_bytes: 132719
}
}
}
}
}
}
}
states {
key: "Second"
value {
content {
content_id: "content"
html: "<p>Try typing some code.</p>"
}
recorded_voiceovers {
voiceover_language_mapping {
key: "content"
value {
voiceover_content_mapping {
key: "hi-en"
value {
filename: "test_audio_3_hi_en.mp3"
file_size_bytes: 59613
}
}
}
}
voiceover_language_mapping {
key: "default_outcome"
value {
voiceover_content_mapping {
key: "hi-en"
value {
filename: "test_audio_3_hi_en.mp3"
file_size_bytes: 59613
}
}
}
}
voiceover_language_mapping {
key: "feedback_1"
value {
voiceover_content_mapping {
key: "hi-en"
value {
filename: "test_audio_3_hi_en.mp3"
file_size_bytes: 59613
}
}
}
}
}
}
}
states {
key: "Third"
value {
content {
content_id: "content"
html: "<p>Are you a cat or dog person?</p>"
}
recorded_voiceovers {
voiceover_language_mapping {
key: "ca_placeholder_3"
value {
}
}
voiceover_language_mapping {
key: "content"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "content-en-3iibmhu8je2.mp3"
file_size_bytes: 57996
}
}
}
}
voiceover_language_mapping {
key: "default_outcome"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "feedback-en-s0w3v9gslr9.mp3"
file_size_bytes: 55733
}
}
}
}
voiceover_language_mapping {
key: "feedback_1"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "feedback-en-kt33y1e2rwg.mp3"
file_size_bytes: 41549
}
}
}
}
voiceover_language_mapping {
key: "feedback_2"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "feedback-en-vvixng5ajds.mp3"
file_size_bytes: 38524
}
}
}
}
voiceover_language_mapping {
key: "hint_1"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "hint-en-jca2lxjibh.mp3"
file_size_bytes: 47188
}
}
}
}
voiceover_language_mapping {
key: "rule_input_4"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "hint-en-jca2lxjibh.mp3"
file_size_bytes: 47188
}
}
}
}
voiceover_language_mapping {
key: "rule_input_5"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "hint-en-jca2lxjibh.mp3"
file_size_bytes: 47188
}
}
}
}
voiceover_language_mapping {
key: "solution"
value {
voiceover_content_mapping {
key: "en"
value {
filename: "solution-en-t0xc2qtuf0j.mp3"
file_size_bytes: 79822
}
}
}
}
}
}
}
content_version: 1
@anandwana001
Copy link
Author

Adventure.yaml

states {
  key: "get coins"
  value {
    content {
      content_id: "content"
      html: "<p>He gives you the <strong>coins</strong> and uses his magic to return you back to the troll.</p>"
    }
    interaction {
      continue_ {
        default_outcome {
          destination_state: "Troll"
          feedback {
            content_id: "default_outcome"
          }
        }
      }
    }
    recorded_voiceovers {
      voiceover_language_mapping {
        key: "ca_buttonText_0"
        value {
        }
      }
      voiceover_language_mapping {
        key: "content"
        value {
        }
      }
      voiceover_language_mapping {
        key: "default_outcome"
        value {
        }
      }
    }
    written_translations {
      translation_language_mapping {
        key: "ca_buttonText_0"
        value {
        }
      }
      translation_language_mapping {
        key: "content"
        value {
        }
      }
      translation_language_mapping {
        key: "default_outcome"
        value {
        }
      }
    }
  }
}

@anandwana001
Copy link
Author

anandwana001 commented Aug 23, 2021

All Interaction.yaml

    interaction {
      fraction_input {
        customization_args {
          requires_simplest_form: true
          allow_improper_fractions: true
          allow_nonzero_integer_part: true
        }
        default_outcome {
          destination_state: "Fraction Input"
          feedback {
            content_id: "default_outcome"
            html: "<p>No, that\'s not right. The answer is 2/5.</p>"
          }
        }
      }
    }
    interaction {
      item_selection_input {
        customization_args {
          min_allowable_selection_count: 1
          max_allowable_selection_count: 1
          choices {
            content_id: "ca_choices_4"
            html: "<p>Choice 1</p>"
          }
          choices {
            content_id: "ca_choices_5"
            html: "<p>Choice 2</p>"
          }
          choices {
            content_id: "ca_choices_6"
            html: "<p>Choice 3</p>"
          }
        }
        default_outcome {
          destination_state: "Item Selection Single"
          feedback {
            content_id: "default_outcome"
          }
        }
      }
    }
hints {
          hint_content {
            content_id: "hint_1"
            html: "<p>sdf</p>"
          }
        }
interaction {
      image_click_input {
        customization_args {
          image_and_regions {
            image_file_path: "code_sample_height_333_width_466.png"
            labeled_regions {
              normalized_rectangle_2d {
                upper_left {
                  x: 0.004291845493562232
                  y: 0.004692192192192192
                }
                lower_right {
                  x: 0.40987124463519314
                  y: 0.05874624624624625
                }
              }
              label: "classdef"
            }
            labeled_regions {
              normalized_rectangle_2d {
                upper_left {
                  x: 0.07296137339055794
                  y: 0.06475225225225226
                }
                lower_right {
                  x: 0.9892703862660944
                  y: 0.1218093093093093
                }
              }
              label: "docstring"
            }
            labeled_regions {
              normalized_rectangle_2d {
                upper_left {
                  x: 0.07296137339055794
                  y: 0.15183933933933935
                }
                lower_right {
                  x: 0.6995708154506438
                  y: 0.44012762762762764
                }
              }
              label: "instancefunc"
            }
            labeled_regions {
              normalized_rectangle_2d {
                upper_left {
                  x: 0.06866952789699571
                  y: 0.46114864864864863
                }
                lower_right {
                  x: 0.6931330472103004
                  y: 0.776463963963964
                }
              }
              label: "classfunc"
            }
            labeled_regions {
              normalized_rectangle_2d {
                upper_left {
                  x: 0.06437768240343347
                  y: 0.821509009009009
                }
                lower_right {
                  x: 0.740343347639485
                  y: 0.9926801801801802
                }
              }
              label: "ctor"
            }
          }
        }
        default_outcome {
          destination_state: "Image Region click"
          feedback {
            content_id: "default_outcome"
            html: "<p>Constructors <em>initialize</em>\302\240an object, or <em>init</em>\302\240it.Constructors are also functions themselves.</p>"
          }
        }
        hints {
          hint_content {
            content_id: "hint_1"
            html: "<p>sdf</p>"
          }
        }
      }
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment