This is a demo for the Khan Academy CS live code editor. If you want to read more about it, head over to the project's github page. The demo uses a local app engine server to save the recordings, translodit for encoding it to mp3, and S3 for storing the audio files.
- google app engine python SDK
- free transloadit.com account (they have a limit of 1GB per free account)
- AWS S3 bucket
- download the python app engine sdk
- clone this repo
- create a free account with transloadit.com
- in your account, create a new template which should look like this:
{
"steps": {
"mp3": {
"use": ":original",
"robot": "/audio/encode"
},
"export": {
"use": "mp3",
"robot": "/s3/store",
"key": "S3_KEY",
"secret": "S3_SECRET",
"bucket": "S3_bucket_name"
}
}
}- in
views/index.htmlat lines 107 - 108 add the keys from your transloadit.com account: - cd into the project's folder, and run
gcloud preview app run ./app.yaml
- go to localhost:8080
- hit Record
- the app allows you to record in chunks, for each chunk press Start new chunk, Stop recording chunk, Save recording chunk, and finally Save Recording
The final recording should be more than 15 seconds, it errors out when the audio file is too small.
For a deep dive into the components of the LiveEditor, read this wiki. You can also watch these talks that the team has given about the editor: