Skip to content

Commit

Permalink
Merge pull request #25 from facn6/readme
Browse files Browse the repository at this point in the history
added details to readme
  • Loading branch information
samjam48 authored Aug 1, 2019
2 parents 402e593 + df1252d commit 4aa415e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
# Week5-sam-ameer-make-notes
# Week5-sam-ameer-make-notes

## Open App

App is deployed to heroku at url:
https://make-notes.herokuapp.com/

### Run Locally
You can run the app locally by cloning and running npm install.

You will need to create your own Google API keys to run the google speech to text API but the rest of the app will work and you can see what it is doing to test it.

## About

The app uses the Google transcript API to turn speech into text.
It currently only accepts .wav files and uses files that we have recorded locally in demonstration.

In future stretch goals we could let the user upload there own files or record live on the website. The api has a cool streaming conversion option.

## Lessons

Spent a lot of time maging the google api work with request converting the prebuilt google-speech-api module that does it all for you. perhaps just use the tools that already exist but was good to do the proper requested task of using request module.
So nearly gave up on bothering to use the google api at all. Lesson, you are often closer to success than you think, but perhaps do things that are easier in the first place.

Travis CI was a whole pain to set up with API keys and local variables but useful to understand.
Great lessons on Process Env variables here: [how you can actually use node environment variables](https://www.freecodecamp.org/news/heres-how-you-can-actually-use-node-environment-variables-8fdf98f53a0a/)

Sending data to front end and navigating local files to tell it what is available was interesting but as we about to learn how to use databases not exactly the best solution. If we had time we would have implemented it to use files from the user instead of hosting them on our server anyway.

Writing tests upfront was good but not always correct and often had to rewrite them. Didn't test some of the final things.

6 changes: 3 additions & 3 deletions public/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let searchBar = document.getElementById('myInput');
const searchBar = document.getElementById('myInput');

fetch(`${window.location.href}api/assets`)
.then(data => data.json()).then(({ files }) => {
Expand All @@ -9,7 +9,7 @@ fetch(`${window.location.href}api/assets`)
node.appendChild(textnode);
node.addEventListener('click', (e) => {
searchBar.value = file;
})
});
document.getElementById('list').appendChild(node);
});
});
Expand All @@ -23,7 +23,7 @@ const transcribe = (filename) => {
// transcribe('ameer-test.wav');

function search_audio() {
let input = searchBar.value.toLowerCase();
const input = searchBar.value.toLowerCase();
const x = document.getElementsByClassName('file_li');
for (i = 0; i < x.length; i++) {
if (!x[i].innerHTML.toLowerCase().includes(input)) {
Expand Down

0 comments on commit 4aa415e

Please sign in to comment.