audio-regions.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. const config = `
  2. <View>
  3. <Header value="Select regions:"></Header>
  4. <Labels name="label" toName="audio" choice="multiple">
  5. <Label value="Beat" background="yellow"></Label>
  6. <Label value="Voice" background="red"></Label>
  7. <Label value="Guitar" background="blue"></Label>
  8. <Label value="Other"></Label>
  9. </Labels>
  10. <Header value="Select genre:"></Header>
  11. <Choices name="choice" toName="audio" choice="multiple">
  12. <Choice value="Lo-Fi" />
  13. <Choice value="Rock" />
  14. <Choice value="Pop" />
  15. </Choices>
  16. <Header value="Listen the audio:"></Header>
  17. <Audio name="audio" value="$url"></Audio>
  18. </View>
  19. `;
  20. const data = {
  21. url: "/public/files/barradeen-emotional.mp3",
  22. };
  23. const result = [
  24. {
  25. from_name: "label",
  26. id: "SsGrpVgy_C",
  27. to_name: "audio",
  28. original_length: 98.719925,
  29. type: "labels",
  30. origin: "manual",
  31. value: {
  32. channel: 0,
  33. end: 28.50568583621215,
  34. labels: ["Beat"],
  35. start: 12.778410892095105,
  36. },
  37. },
  38. {
  39. from_name: "label",
  40. id: "JhxupEJWlW",
  41. to_name: "audio",
  42. original_length: 98.719925,
  43. type: "labels",
  44. origin: "manual",
  45. value: {
  46. channel: 1,
  47. end: 59.39854733358493,
  48. labels: ["Other"],
  49. start: 55.747572792986325,
  50. },
  51. },
  52. {
  53. from_name: "choice",
  54. id: "hIj6zg57SY",
  55. to_name: "audio",
  56. type: "choices",
  57. origin: "manual",
  58. value: {
  59. choices: ["Lo-Fi"],
  60. },
  61. },
  62. ];
  63. const title = "Audio regions";
  64. module.exports = { config, data, result, title };