Hi, does anyone know if Identikit will accept sound recordings such as MP3? I would really like to add some bird songs and calls to my Waders Identikit prototype. Thanks.
Hi Steve. Good to hear from you. There is currently no way to make use of sound files in Identikit. It would be a nice feature though and worth raising a feature request via a GitHub issue: https://github.com/FieldStudiesCouncil/tombiovis/issues
Would it be possible to provide a link out to a resource (e.g., a sound file) hosted elsewhere on the web?
Actually you are right Charles you could put links into an HTML file which is referenced in the media file against each particular species (what we often used for ‘species descriptions’). There’s nothing to stop you hosting them on the same site I guess.
I just confirmed that can be done. I updated the example file kb/biscuits/resources/text/Bourbon.html to include the following html:
<p> What to hear what this buiscuit sounds like? </p> <audio controls> <source src="kb/biscuits/resources/sound/file_example_MP3_700KB.mp3" type="audio/mpeg"> Your browser does not support the audio tag. </audio>
Which results in this playable MP3.
The not so nice bit is specifying the path to the MP3 file. I thought I would be able to specify it like this:
<source src="##tombiokbpath##resources/sound/file_example_MP3_700KB.mp3" type="audio/mpeg">
Because I thought that the software would replace the ##tombiokbpath## token with the the relative root of the kb folder, but it doesn’t - that’s currently only a feature of the general info.html file that you can associate with the whole Identikit installation. We need an update to fix this - I’ll raise an issue referencing this post.
Consequently you need to know the relative path of your kb folder as it is deployed which could be different to how you have it on your development machine. So you would both (i.e. Steve and Charles) have to work together to make this work on the deployed site currently.
Hi Rich/Charles, I’m not sure that I understand what is required to get this working? I would like to connect with specific bird recordings on the following website: https://www.xeno-canto.org/
Hi Steve. You will need to use the HTML feature described on page 23 of the manual (https://github.com/FieldStudiesCouncil/tombiovis/blob/master/identikit/documentation/Building%20a%20knowledge-base.pdf).
So you would create a small HTML page for each species and either use a normal hyperlink tag to link to an external page use the audio tag as shown above to link to embed the sound files.
Below is the contents of a test file I created called curlew.html
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> </head> <body> <h2>Linking to a pages for Curlew</h2> <p> This is an example of linking to the whole xeno-canto page for curlew. <a href='https://www.xeno-canto.org/explore?query=curlew' target="_blank">Xeno-canto Curlew</a>. </p> <p> This is an example of linking to a whole xeno-canto page hosting a particular soundfile. <a href='https://www.xeno-canto.org/495980' target="_blank">XC495980 · Eurasian Stone-curlew · <i>Burhinus oedicnemus</i></a>. </p> <h2>Linking to individual sound files</h2> <p> This is an example of embedding to a specific file. </p> <p> XC495980 · Eurasian Stone-curlew · <i>Burhinus oedicnemus</i>: </p> <p> <audio controls> <source src="https://www.xeno-canto.org/sounds/uploaded/RNMRWBXEZJ/XC495980-Griel%2C%20call%2C%20Aiguamolles%20de%20l%27emporda%2C%20160819%2C%200020%20uur.mp3"> Your browser does not support the audio tag. </audio> </p> </body> </html>
You’d link to that on the media tab like this (I’ve just linked it to the Happy Face taxon in the buiscuits kb):
And that gives you this on the ‘Details’ tab of the taxon details popup:
Hi Rich, good to hear from you. I now have this working, almost! Three questions:
When linking to a specific .mp3 file on the Xeno-Canto website where do you copy the full https address from? e.g. for insertion into the line
Will these sound recordings be available when using the app off-line i.e. without an internet connection?
Can they be invoked from ‘Character’ or ‘Character Value’ rather than ‘Taxon’?
Many thanks, Steve
Actually there’s a better way to include than the audio tag - you can embed using an iframe as recommended on their site. Find the recording you want and then click on the ‘XC…’ index to go to the page for that recording and you will see an ‘embed’ link under actions on the right. Click that and copy one of the iframe tags that is displayed, e.g.:
<iframe src='https://www.xeno-canto.org/528483/embed?simple=1' scrolling='no' frameborder='0' width='340' height='115'></iframe>
Then just paste that into your HTML page - instead of the audio tag. You will end up with something like this:
This isn’t like the built-in functionality for images etc which caches them for offline use, so you would need to be online to use this.
Hi Rich, thanks for your help - I have the sound files running well now on the Waders Identikit prototype. Will the App still run off-line (but without the sound files) or will it cause it not to work at all off-line?
It looks really good but I still think that it would be worth considering as a possible system upgrade, so that sound files can be accessed off-line and also from ‘Characters’ and/or ‘Character Values’ as well as ‘Taxon’. This would be an even better function in the case of Waders on a mobile. It might also be worth considering an extra ‘Taxon Tab’ called ‘Sounds’ alongside ‘Knowledge-base’, ‘Images’ and ‘Details’. If you think this would be a good idea how should I request/register this?
I know I’ve already responded by email, but I’ll repeat this here for the benefit of others who may find…
The sound files will normally need an internet connection to work unless you visit one that your browser has already cached. The best way to raise a feature request is by entering an issue in GitHub: https://github.com/FieldStudiesCouncil/tombiovis/issues, but we have very limited resources so anything beyond bug-fixes is not likely to be addressed anytime soon.
Hi Rich, I totally understand the situation regarding future Identikit developments/features, many thanks for your help this far. I have raised a feature request on Github just in case resources become available.
Excellent - thanks Steve.