Just now, speaker information isn't exposed through the Alveo API or web interface but it is stored with some corpora in the metadata store. The only way to query and access speaker information is via the SPARQL query interface which sends queries to the backend RDF metadata store for a collection through the API.
I'll give an example of how to use this via the R environment. This will make use of the alveo-r interface which is still in development but available from https://github.com/Alveo/alveo-r.
To get the speaker data you will need to use a SPARQL query since it is not yet available via the API directly. A suitable query would be:
prefix olac: <http://www.language-archives.org/OLAC/1.1/> select ?s ?p ?v where { <https://app.alveo.edu.au/catalog/austalk/1_1018_2_5_004> olac:speaker ?s . ?s ?p ?v . }
Here's some code that will run the query:
# find the properties of all speakers associated with this item # eg. properties <- speaker_properties(client, "<http://app.alveo.edu.au/catalog/austalk/1_1018_2_5_004", "austalk") # "speaker_properties" <- function(client, itemurl, collection) { q1 <- "prefix olac: <http://www.language-archives.org/OLAC/1.1/>\ select ?s ?p ?v where {\ <" q2 <- "> olac:speaker ?s .\ ?s ?p ?v .\ }" query = paste(q1, itemurl, q2, sep="") cat(query) json <- client$sparql(query, collection) return(json$results$bindings) }
To use the code we first create a client for the API, then call the new function:
config <- read_config() client <- RestClient(config$base_url) properties <- speaker_properties(client, "http://app.alveo.edu.au/catalog/austalk/1_1018_2_5_004", "austalk") # to look at a property properties[[3]]$s$value # result: "http://id.austalk.edu.au/participant/1_1018" properties[[3]]$p$value # result: "http://ns.austalk.edu.au/name" properties[[3]]$v$value # result "Gold - Leadbeater's Possum"
The return type is an R data structure containing the bindings for ?s ?p and ?v in the query, these are the speaker identifier (a URL), the property name and the property value.