Create HIT using wav files - amazon-web-services

I am a new Requestor, and trying to create a new HIT based on the Audio Naturalness HTML template in https://requester.mturk.com/create/projects/new.
I would like to use wav files, and in the html file provided, I have modified the audio_url line to look like:
<!-- Your audio file URLs will be substituted for the "audio_url" variable when you publish a batch with a CSV input file containing multiple
audio file URLs -->
<source src="${audio_url}" type="audio/wav" />
When I'm going to publish the batch, it asks for a csv, which looks like:
audio_url
https://github.com/user/voiceTTS/blob/master/Sample1a.wav
https://github.com/user/voiceTTS/blob/master/Sample1b.wav
However, when I go to preview the HIT, the audio files are blank, i.e. nothing plays.
Where am I going wrong?

This was actually an issue with hosting audio files on GitHub. I hosted them on my personal website, and it works as expected!

Related

uploading arabic files in django not working returning codes

i have a view in my django project that should be able to read the content of an uploaded .txt file from the input type="file", but the thing is that with arabic content it doesn't print the actual text, but a series of codes "\xd9\x88\xd9\x82\xd8\xa7\xd9\x84" and i couldn't find any solution for this since the file is perfectly viewable on my pc and my website it the one exporting that file in "utf-8". any help here ?
Uploaded_File = request.FILES["Doc"]
for chunk in Uploaded_File.chunks(chunk_size=None):
print(chunk)

Django create zip file and download/upload "correctly"

Which parts of Django should handle file download, upload and manipulation functionality? "Where should this code live?"
I have a Django app. I want implement the following functionality in the admin interface.
Download Function:
Take some model objects and write them to a file (json, pickle, shelve, whatever)
Zip the file created in step 1, along with some image files
The user downloads the zip file and temp files are deleted
Upload Function:
User upload the file described above
The file is unzipped, the image files are written to the disk and new objects are created to load the data into the database
Which parts of the my Django app are the "correct" parts for me to implement this functionality into?
Edit:
To put it another way: "Where should this code live?"
Edit:
To clarify my question. In the extreme case, all of this could be written one .py file. For example in views.py. This would "work" but probably be "incorrect" from an MVC perspective. My is how to do this "correctly", rather than just how to get this working.

How to make an HTML5 file grow?

I am writing a logger in C++ that generates an HTML5 output in real time. So the HTML file must be readable at any time, even while growing.
So far I open the file, I delete the last few lines that close the block (</body></html>), I add the new log messages and I close the block again.
Is this a good approach, or are there any better solutions?
Another approach would be to read (through XMLHttpRequest) the log file directly by JavaScript inside HTML file and generate HTML within the browser. This may end up being quite slow for large log files though (100 MB+).
If the only thing you need is just to wrap your textual log file with a header and a footer, you can just create a markup as needed and add an <iframe src="log.txt"> tag between a header and footer, which src attribute would point to the raw textual log file. This wouldn't suite you if you need to format the log somehow, of course.

Include a text file in a gh-pages jekyll template also available to js

I'm making a "this day in history" sort of site in gh-pages, using javascript to pull the day's entry for the front page and a collection to store all the other entries indexed by date.
The entries are text files.
I've made markdown files as stubs to pull in the text files. I don't want to replicate the text files if possible, because then any typos I would have to remember to fix in two places.
As far as I can see, there are two ways to include the text files in the template:
{% include date.txt %} which requires the txt files to be in the _includes directory, thus not generated into the site and not available to the javascript on the front page
{% include_relative date.txt %} which requires the txt file to be in the collection folder, which is also not generated unless it has a yaml header, in which case it would be difficult to extract the text from the generated html.
Is there another way I'm missing for jekyll to include plain text files without them having to be in special _folders?
I'm using github pages, so plugins are out.
I think there is no other way to include text files through liquid. It is part of the way it separates published files from the pieces that go together to make the files.
The way forward is to adapt the javascript to read the text from a raw blob from the github repository.
But using an http request to raw.githubusercontent.com gives a Cross Origin Resource Sharing error.
So next way is to make a new collection with a new layout to output the input files as they are.

HTML5: Playing Audio

I would like to play an audio in my Django app.. I am trying to include the audio but it doesn't seem to play..
I tried two things..
1)
<audio id="BillaTheme" autoplay>
<source src="../media/audio/Billa2Theme.mp3"/>
</audio>
2)
MEDIA_URL = '/Users/Projects/beer/ThirdProject/media/'
<audio id="BillaTheme" autoplay>
<source src="{{MEDIA_URL}}audio/Billa2Theme.mp3"/>
</audio>
Both doesn't seem to work. Need some guidance on this...
Django Application server can't find your audio file. It can't find it on the path: "/Users/Projects/beer/ThirdProject/media/audio/Billa2Theme.mp3". Check the path and the name of file properly. It's case-sensetive - the path and the name of file.
Output your MEDIA_ROOT in a template and make sure that it is exactly you want.
If you use another web server to serve static files then check the access log of the server.
Does your browser support mp3? Take a look at the "Audio Formats and Browser Support" table at w3schools
You could also give a try to the nice & open-source soundmanager2.