This is a guest post by Richard Isaacs – Digital Content Assistant of Fresh 92.7
This is a simple tutorial for generating the artist and title from your ACRCloud JSON stream now plating metadata for a standard online radio audio stream being monitored using the ACRCloid Broadcast Monitoring function.
- To begin you will need to set up your ARC account and set up your audio stream. You can get a free trial account at here.
- Once you are set up you can access your console at here and use the instructions at here to set up your first radio stream for monitoring.
- Once you have your stream reading and set up the results will be available in your console as in Step 3 of the tutorial linked above. But, how can you show the results on your website? The following is one method I use which uses some basic PHP functions and a simple shortcode plugin.Note 1 you do not have to use the shortcode plugin, shortcodes can be hardcoded into your root files such as the functions PHP file of a WordPress theme/child theme but this is simpler and available via the standard WordPress login and doesn’t require FTP or similar secure access.
- It always pays to create a site backup and database backup before writing any PHP code or installing any new plugins. Once done, locate a suitable shortcode plugin creator from the WordPress plugins database and ensure it can run PHP and is compatible with your current WordPress installation and PHP version.
I have used ShortCodes UI in the past but it is now out of date and will be finding an alternative shortly.
- Now you will need your radio ACRCloud JSON stream URL. Use this tutorial to find your stream.Your stream will look something like this
Explanation of above string URL
https://api.acrcloud.com/v1/monitor-streams/ this is the standard stream URL for monitoring
s-bVX73QK/ this is the ARCCloud stream ID available from your ACRCloud account once set up in the console as at step 2 above
results?access_key= enter this is to allow it to run the key in order to access the data
4709cb1d4bf05a8e782034797fxxxxxx this is the key linked with the stream id above. The key can be found in the console under the Broadcast Monitoring tab on the left in your ACRCloud console.
Once you have your plugin installed find the PHP option in the shortcode generator for a new shortcode (see example below) and create shortcodes using the codes available at this gist on Github.
example PHP input
Then once you have your shortcodes you can place them anywhere on your site to call the results.
[Artist] – [Track]