<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Toward a Voice Querying on Smart Speaker via SPARQL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Takuya Adachi</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Naoki Fukuta</string-name>
          <email>fukuta@inf.gshizuoka.ac.jp</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>College of Informatics, Academic Institute, Shizuoka University</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Department of Informatics, Graduate School of Integrated Science and Technology, Shizuoka University</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In this paper, we present a mechanism and its prototype design to realize speak to query interface for querying SPARQL queries via smart speakers. Our prototype system allows us to retrieve results from an endpoint as a voice command. Additionally, our approach tries to create the answers for the given SPARQL queries by voice commands via smart speakers.</p>
      </abstract>
      <kwd-group>
        <kwd>SPARQL</kwd>
        <kwd>smart speaker</kwd>
        <kwd>ontology mapping</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>We often ask something to a smart speaker device using a natural language
query. However, it is not an easy way to clearly express some complex conditions
of queries using such a natural language query. SPARQL is a query language
to communicate to various SPARQL endpoints by a software. However, there
is nothing to limit such communications to the way to communicate among
software systems, and some people who are familiar with SPARQL actually
speak SPARQL for communication. In this paper, we present a mechanism to
help such people better utilize current smart speaker devices.</p>
      <p>Figure 1 shows an overview of our prototype system design. A Users speaks
a SPARQL query to a smart speaker, then the voice activity detector analyzes
the user's voice and prepares the SPARQL query. The query executor retrieves
results from SPARQL endpoints by using a SPARQL query to t to the spoken
content. The response generator interprets results and generates a response to
respond the result in a speaker-friendly form. After that, the voice synthesizer
outputs the actual auditory data generated by the speech synthesis engine to a
smart speaker. In this way, the smart speaker tells the result to the users.</p>
      <p>Figure 2 shows a system structure of our prototype system design. Smart
speakers could be some of commercially sold products such as Google Home,
Amazon Echo (dot), Xperia Hello!. Smart speakers have some functions to
recognize the user's voice and to play an audio data according to the commands
from the user. Smart speakers often give users to develop applications
themselves. The voice assistant can be connected to commercial products such as
!"#"$%&amp;'()*+,-&amp;
./"0"&amp;1&amp;
'()*+,-&amp;*23456()
7
&lt;,=&gt;)&amp;?&gt;5=@=56&amp;</p>
      <p>A)5)&gt;5=,?92=,&amp;F-3,G</p>
      <p>?92=,&amp;F-3,G
8)5&amp;*)+9:5+;
&lt;,=&gt;)&amp;!6-5D)+=+
!H?0B#&amp;I9)*6</p>
      <p>#=-J9=+5=&gt;&amp;F-3,G</p>
      <p>
        B9)*6&amp;
"C)&gt;95=,0)+9:5+
0)+(,-+)&amp;
8)-)*E5=,Google Assistant3[
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. The action executor selects an action event when that gets
an analysis result from the voice assistant and sends the results from
external web apis to the voice assistant. The action executor can be connected to
some process control mechanisms such as Dialog ow4. Our Web API has
features about parsing and reconstructing queries from voice commands, managing
query executions and the response generations.
      </p>
      <p>Figure 3 shows an example smart speaker device for our prototype system.
On our prototype implementation, we utilize Amazon Echo dot with Amazon
Alexa5.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Response Generation Mechanism</title>
      <p>SPARQL has four query forms: SELECT, CONSTRUCT, ASK and DESCRIBE.
These forms will return the different types of results. To generate an appropriate
response that returns results of the SPARQL query to users, our mechanism
selects the response generation mechanism for each SPARQL query form.</p>
      <p>On responding to SELECT form, the response generator generates two
information. one is the number of results, another is each result. If the result is
large6, then a response uses a few results. For example, the response generator
3 https://assistant.google.com/
4 https://dialog ow.com/
5 https://developer.amazon.com/alexa
6 The large means the size is exceeding a prede ned threshold.</p>
      <p>3:*.)&amp;
39%*;%.</p>
      <p>Toward a Voice Querying on Smart Speaker via SPARQL
'$)#"+&amp;7&lt;%$-)".
,-.&amp;/%0&amp;'12
31'456&amp;
7+89"#+)
gets 10 results, then the response should be like \I gets 10 results, I read the rst
5 results". On responding to CONSTRUCT form, the response contains what
triples are constructed since the user might seek them. On responding to ASK
form, the response generator creates the answer, that contains not only \Yes"
or \No" but also the number of results. On responding to DESCRIBE form,
the response is what results are obtained in detail, that contain the number of
entities connected properties.</p>
      <p>Results sometime contain URIs. If a smart speaker speaks a URI, it is difficult
for users to understand what URI means. Our mechanism obtains labels and
comments of URIs to understand URIs and speak them7.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Empty Answer Problem</title>
      <p>When a user speaks SPARQL queries, then the user needs precisely
understanding the structure and schema of the dataset in the endpoint. Moreover, it is
hard for the user to fully speak URIs in SPARQL queries. In the case that an
inappropriate query returns an empty set, that is called empty-answer problem.</p>
      <p>
        There are some effective approaches to be solved this problem (for example,
graph embedding approach[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]). Although these approaches are helpful in some
context, in this case that the user speak SPARQL queries, these approaches
7 Applying some ontology mapping techniques to obtain better understandable labels
is future work.
might not be helpful enough. On our prototype system, in the case the query
returns an empty set, then we try to execute enhanced SPARQL queries using
SPARQLoid mechanism[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] and on-the- y ontology matching mechanism[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] to
retrieve user seeking results.
4
      </p>
    </sec>
    <sec id="sec-4">
      <title>Conclusion</title>
      <p>In this paper, we presented a mechanism and its prototype design to realize
speak-to-query interface for directly querying SPARQL queries via smart
speakers. Our prototype system allows us to retrieve results from an endpoint as a
voice command. Additionally, our approach tries to create the answers for the
given SPARQL queries by voice commands via smart speakers.</p>
      <p>In our future work, we consider a way to address the issue about how to
represent graphical structures in auditory from in combination to some display
devices for representing more complex results obtained from complex queries.
To fully integrate our mechanism to many smart speakers is also future work.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Adachi</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fukuta</surname>
          </string-name>
          , N.:
          <article-title>A Mapping-enhanced Linked Data Inspection and Querying Support System using Dynamic Ontology Matching</article-title>
          .
          <source>In: Proc. of 2nd International Workshop on Platforms and Applications for Social problem Solving and Collective Reasoning (PASSCR2017)</source>
          . pp.
          <volume>1191</volume>
          {
          <issue>1194</issue>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Fujino</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fukuta</surname>
          </string-name>
          , N.:
          <article-title>Utilizing Weighted Ontology Mappings on Federated SPARQL Querying</article-title>
          .
          <source>In: Proc. of the 3rd Joint International Semantic Technology Conference (JIST2013)</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sainath</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Narayanan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Caroselli</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bacchiani</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misra</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shafran</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sak</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pundak</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chin</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sim</surname>
            ,
            <given-names>K.C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Weiss</surname>
            ,
            <given-names>R.J.</given-names>
          </string-name>
          , Wilson,
          <string-name>
            <given-names>K.</given-names>
            ,
            <surname>Variani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Siohan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            ,
            <surname>Weintraub</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>McDermott</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            ,
            <surname>Rose</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Shannon</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Acoustic modeling for google home</article-title>
          .
          <source>In: INTERSPEECH</source>
          <year>2017</year>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          , Liu,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            ,
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Qi</surname>
          </string-name>
          , G.:
          <article-title>Towards Empty Answers in SPARQL: Approximating Querying with RDF Embedding</article-title>
          .
          <source>In: Proc. of the 17th International Semantic Web Conference (ISWC2018)</source>
          . pp.
          <volume>513</volume>
          {
          <issue>529</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>