Giter Club home page Giter Club logo

hyperaudio-lite-editor's Introduction

hyper.audio!

To run storybook โ€“ clone develop branch, go inside of packages/remixer and run nvm install then yarn, then jump inside packages/storybook run yarn and finally yarn start.

hyperaudio-lite-editor's People

Contributors

maboa avatar scarsellifi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyperaudio-lite-editor's Issues

Break down parseData function into smaller parts

function parseData(json) {

parseData function actually:

  1. takes the branches of the json and collects the useful data for the subsequent steps
  2. processes deepgram data and transforms it into hyperTranscript
  3. put the hyperTranscript in the DOM.

I recommend splitting the current function into three functions, so that the code is more easily testable and reusable

Notify the user that the transcription has been completed using the notification() function in JavaScript

I would like to suggest using the notification() function in JavaScript (https://developer.mozilla.org/en-US/docs/Web/API/Notification) to notify the user that the transcription has been completed . This function can provide a more user-friendly and intuitive way for the user to be informed about the status of the transcription process: using the notification() function would also be a better solution than keeping the page open and constantly checking for updates. It would allow the user to continue using the application or navigate to a different page while the transcription is being processed, without the need to constantly monitor the status.

I believe that this small change can improve the user experience of the application and make it more convenient for the user to use.

Thank you for considering this suggestion.

Performance review and possible improvement

There are probably a few things we can do here.

Currently we regenerate the contents of the download urls everytime we run the sanitise function. We could generate these on demand using a technique similar to...

const saveDataToFile = (data, filename) => {
  const a = document.createElement('a');
  a.style = 'display:none';

  document.body.appendChild(a);

  const blob = new Blob([data], {
    type: 'octet/stream',
  });

  const url = window.URL.createObjectURL(blob);

  // eslint-disable-next-line
  console.log(`saveDataTofile: ${blob.size} bytes to ${filename}`);

  a.href = url;
  a.download = filename;

  a.click();

  window.URL.revokeObjectURL(url);
  a.remove();
};

Or inserting values into the template using this...

   fetch('hyperaudio-template.html')
    .then(function(response) {
        // When the page is loaded convert it to text
        return response.text()
    })
    .then(function(html) {
        // Initialize the DOM parser
        var parser = new DOMParser();

        // Parse the text
        var doc = parser.parseFromString(html, "text/html");

        // You can now even select part of that html as you would in the regular DOM 
        // Example:
        var docArticle = doc.querySelector('article').innerHTML;

        console.log(doc);
    })

parseData function have too much responsability

function parseData(json) {

parseData function actually:

  1. takes the branches of the json and collects the useful data for the subsequent steps
  2. processes deepgram data and transforms it into hyperTranscript
  3. put the hyperTranscript in the DOM.

I recommend splitting the current function into three functions, so that the code is more easily testable and usable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.