<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[172956] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/172956">172956</a></dd>
<dt>Author</dt> <dd>k.czech@samsung.com</dd>
<dt>Date</dt> <dd>2014-08-26 04:25:49 -0700 (Tue, 26 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[EFL] Utilize espeak as a synthesizer back-end for WebSpeech
https://bugs.webkit.org/show_bug.cgi?id=136127

Reviewed by Gyuyoung Kim.

.:

Add build support for espeak.

* Source/cmake/FindEspeak.cmake: Added.
* Source/cmake/OptionsEfl.cmake: Add Espeak dependency.

Source/WebCore:

Utilize espeak API to have support for speak, cancel and initializeVoiceList.

* PlatformEfl.cmake:
* platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
(WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
(WebCore::PlatformSpeechSynthesisProviderEfl::convertRateToEspeakValue):
(WebCore::PlatformSpeechSynthesisProviderEfl::convertVolumeToEspeakValue):
(WebCore::PlatformSpeechSynthesisProviderEfl::convertPitchToEspeakValue):
(WebCore::PlatformSpeechSynthesisProviderEfl::voiceName):
(WebCore::PlatformSpeechSynthesisProviderEfl::engineInit):
(WebCore::PlatformSpeechSynthesisProviderEfl::currentVoice):
(WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
(WebCore::PlatformSpeechSynthesisProviderEfl::speak):
(WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
(WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
* platform/efl/PlatformSpeechSynthesisProviderEfl.h:
* platform/efl/PlatformSpeechSynthesizerEfl.cpp:
(WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
(WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
(WebCore::PlatformSpeechSynthesizer::pause):
(WebCore::PlatformSpeechSynthesizer::resume):
(WebCore::PlatformSpeechSynthesizer::speak):
(WebCore::PlatformSpeechSynthesizer::cancel):

Tools:

Add espeak dependency.

* efl/install-dependencies:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkChangeLog">trunk/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorePlatformEflcmake">trunk/Source/WebCore/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflcpp">trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflh">trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h</a></li>
<li><a href="#trunkSourceWebCoreplatformeflPlatformSpeechSynthesizerEflcpp">trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesizerEfl.cpp</a></li>
<li><a href="#trunkSourcecmakeOptionsEflcmake">trunk/Source/cmake/OptionsEfl.cmake</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolseflinstalldependencies">trunk/Tools/efl/install-dependencies</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourcecmakeFindEspeakcmake">trunk/Source/cmake/FindEspeak.cmake</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/ChangeLog (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/ChangeLog        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/ChangeLog        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-08-26  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
+
+        [EFL] Utilize espeak as a synthesizer back-end for WebSpeech
+        https://bugs.webkit.org/show_bug.cgi?id=136127
+
+        Reviewed by Gyuyoung Kim.
+
+        Add build support for espeak.
+
+        * Source/cmake/FindEspeak.cmake: Added.
+        * Source/cmake/OptionsEfl.cmake: Add Espeak dependency.
+
</ins><span class="cx"> 2014-08-26  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Build break using clang
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Source/WebCore/ChangeLog        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2014-08-26  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
+
+        [EFL] Utilize espeak as a synthesizer back-end for WebSpeech
+        https://bugs.webkit.org/show_bug.cgi?id=136127
+
+        Reviewed by Gyuyoung Kim.
+
+        Utilize espeak API to have support for speak, cancel and initializeVoiceList.
+
+        * PlatformEfl.cmake:
+        * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
+        (WebCore::PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::convertRateToEspeakValue):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::convertVolumeToEspeakValue):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::convertPitchToEspeakValue):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::engineInit):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::currentVoice):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::initializeVoiceList):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::speak):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::cancel):
+        (WebCore::PlatformSpeechSynthesisProviderEfl::fireSpeechEvent):
+        * platform/efl/PlatformSpeechSynthesisProviderEfl.h:
+        * platform/efl/PlatformSpeechSynthesizerEfl.cpp:
+        (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
+        (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
+        (WebCore::PlatformSpeechSynthesizer::pause):
+        (WebCore::PlatformSpeechSynthesizer::resume):
+        (WebCore::PlatformSpeechSynthesizer::speak):
+        (WebCore::PlatformSpeechSynthesizer::cancel):
+
</ins><span class="cx"> 2014-08-26  Ryuan Choi  &lt;ryuan.choi@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Build break using clang
</span></span></pre></div>
<a id="trunkSourceWebCorePlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/PlatformEfl.cmake (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/PlatformEfl.cmake        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Source/WebCore/PlatformEfl.cmake        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -481,6 +481,12 @@
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> if (ENABLE_SPEECH_SYNTHESIS)
</span><ins>+    list(APPEND WebCore_INCLUDE_DIRECTORIES
+        ${ESPEAK_INCLUDE_DIRS}
+    )
+    list(APPEND WebCore_LIBRARIES
+        ${ESPEAK_LIBRARIES}
+    )
</ins><span class="cx">     list(APPEND WebCore_SOURCES
</span><span class="cx">         platform/efl/PlatformSpeechSynthesizerEfl.cpp
</span><span class="cx">         platform/efl/PlatformSpeechSynthesisProviderEfl.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.cpp        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -32,11 +32,13 @@
</span><span class="cx"> #include &lt;PlatformSpeechSynthesisUtterance.h&gt;
</span><span class="cx"> #include &lt;PlatformSpeechSynthesisVoice.h&gt;
</span><span class="cx"> #include &lt;PlatformSpeechSynthesizer.h&gt;
</span><ins>+#include &lt;wtf/text/CString.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl(PlatformSpeechSynthesizer* platformSpeechSynthesizer)
-    : m_platformSpeechSynthesizer(platformSpeechSynthesizer)
</del><ins>+PlatformSpeechSynthesisProviderEfl::PlatformSpeechSynthesisProviderEfl(PlatformSpeechSynthesizer* client)
+    : m_isEngineStarted(false)
+    , m_platformSpeechSynthesizer(client)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -44,10 +46,86 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+int PlatformSpeechSynthesisProviderEfl::convertRateToEspeakValue(float rate) const
+{
+    // The normal value that Espeak expects is 175, minimum is 80 and maximum 450
+    return espeakRATE_NORMAL * rate;
+}
+
+int PlatformSpeechSynthesisProviderEfl::convertVolumeToEspeakValue(float volume) const
+{
+    // 0 = silence, 100 = normal, greater values may produce distortion
+    return volume * 100;
+}
+
+int PlatformSpeechSynthesisProviderEfl::convertPitchToEspeakValue(float pitch) const
+{
+    // 0 = minimum, 50 = normal, 100 = maximum
+    return pitch * 50;
+}
+
+String PlatformSpeechSynthesisProviderEfl::voiceName(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance) const
+{
+    if (!m_platformSpeechSynthesizer)
+        return String();
+
+    if (!utterance-&gt;lang().isEmpty()) {
+        const String&amp; language = utterance-&gt;lang();
+        const Vector&lt;RefPtr&lt;PlatformSpeechSynthesisVoice&gt;&gt;&amp; voiceList = m_platformSpeechSynthesizer-&gt;voiceList();
+        for (const auto&amp; voice : voiceList) {
+            // Espeak adds an empty character at the beginning of the language
+            unsigned length = voice-&gt;lang().length();
+            String lang = voice-&gt;lang().substring(1, length);
+            if (equalIgnoringCase(language, lang))
+                return voice-&gt;name();
+        }
+    }
+
+    espeak_VOICE* espeakVoice = currentVoice();
+    ASSERT(espeakVoice);
+    return ASCIILiteral(espeakVoice-&gt;name);
+}
+
+bool PlatformSpeechSynthesisProviderEfl::engineInit()
+{
+    if (!m_isEngineStarted) {
+        if (!(m_isEngineStarted = espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 0, 0, 0) != EE_INTERNAL_ERROR))
+            return false;
+        espeak_SetVoiceByName(&quot;default&quot;);
+    }
+    return true;
+}
+
+espeak_VOICE* PlatformSpeechSynthesisProviderEfl::currentVoice() const
+{
+    return espeak_GetCurrentVoice();
+}
+
</ins><span class="cx"> void PlatformSpeechSynthesisProviderEfl::initializeVoiceList(Vector&lt;RefPtr&lt;PlatformSpeechSynthesisVoice&gt;&gt;&amp; voiceList)
</span><span class="cx"> {
</span><del>-    UNUSED_PARAM(voiceList);
-    notImplemented();
</del><ins>+    if (!engineInit()) {
+        fireSpeechEvent(SpeechError);
+        return;
+    }
+
+    espeak_VOICE* espeakVoice = currentVoice();
+    ASSERT(espeakVoice);
+    String currentLanguage = ASCIILiteral(espeakVoice-&gt;languages);
+
+    const espeak_VOICE** voices = espeak_ListVoices(nullptr);
+    if (!voices) {
+        fireSpeechEvent(SpeechError);
+        return;
+    }
+
+    // Voices array is terminated by the nullptr
+    for (int i = 0; voices[i]; i++) {
+        const espeak_VOICE* voice = voices[i];
+        String id = ASCIILiteral(voice-&gt;identifier);
+        String name = ASCIILiteral(voice-&gt;name);
+        String language = ASCIILiteral(voice-&gt;languages);
+        voiceList.append(PlatformSpeechSynthesisVoice::create(id, name, language, true, language == currentLanguage));
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesisProviderEfl::pause()
</span><span class="lines">@@ -62,15 +140,65 @@
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesisProviderEfl::speak(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance)
</span><span class="cx"> {
</span><del>-    UNUSED_PARAM(utterance);
-    notImplemented();
</del><ins>+    if (!engineInit() || !utterance) {
+        fireSpeechEvent(SpeechError);
+        return;
+    }
+
+    m_utterance = utterance;
+    String voice = voiceName(m_utterance);
+    espeak_SetVoiceByName(voice.utf8().data());
+    espeak_SetParameter(espeakRATE, convertRateToEspeakValue(m_utterance-&gt;rate()), 0);
+    espeak_SetParameter(espeakVOLUME, convertVolumeToEspeakValue(m_utterance-&gt;volume()), 0);
+    espeak_SetParameter(espeakPITCH, convertPitchToEspeakValue(m_utterance-&gt;pitch()), 0);
+
+    String textToRead = m_utterance-&gt;text();
+    espeak_ERROR err = espeak_Synth(textToRead.utf8().data(), textToRead.length(), 0, POS_CHARACTER, 0, espeakCHARS_AUTO, 0, nullptr);
+    if (err == EE_INTERNAL_ERROR) {
+        fireSpeechEvent(SpeechError);
+        m_utterance = nullptr;
+        return;
+    }
+
+    fireSpeechEvent(SpeechStart);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesisProviderEfl::cancel()
</span><span class="cx"> {
</span><del>-    notImplemented();
</del><ins>+    if (!m_isEngineStarted || !m_utterance)
+        return;
+
+    if (espeak_Cancel() == EE_INTERNAL_ERROR) {
+        fireSpeechEvent(SpeechError);
+        m_utterance = nullptr;
+        return;
+    }
+    fireSpeechEvent(SpeechCancel);
+    m_utterance = nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void PlatformSpeechSynthesisProviderEfl::fireSpeechEvent(SpeechEvent speechEvent)
+{
+    switch (speechEvent) {
+    case SpeechStart:
+        m_platformSpeechSynthesizer-&gt;client()-&gt;didStartSpeaking(m_utterance);
+        break;
+    case SpeechPause:
+        m_platformSpeechSynthesizer-&gt;client()-&gt;didPauseSpeaking(m_utterance);
+        break;
+    case SpeechResume:
+        m_platformSpeechSynthesizer-&gt;client()-&gt;didResumeSpeaking(m_utterance);
+        break;
+    case SpeechError:
+        m_isEngineStarted = false;
+    case SpeechCancel:
+        m_platformSpeechSynthesizer-&gt;client()-&gt;speakingErrorOccurred(m_utterance);
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+    };
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflPlatformSpeechSynthesisProviderEflh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesisProviderEfl.h        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -28,8 +28,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SPEECH_SYNTHESIS)
</span><span class="cx"> 
</span><ins>+#include &lt;speak_lib.h&gt;
</ins><span class="cx"> #include &lt;wtf/PassRefPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/Vector.h&gt;
</span><ins>+#include &lt;wtf/text/WTFString.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -39,6 +41,14 @@
</span><span class="cx"> 
</span><span class="cx"> class PlatformSpeechSynthesisProviderEfl {
</span><span class="cx"> public:
</span><ins>+    enum SpeechEvent {
+        SpeechError,
+        SpeechCancel,
+        SpeechPause,
+        SpeechResume,
+        SpeechStart
+    };
+
</ins><span class="cx">     explicit PlatformSpeechSynthesisProviderEfl(PlatformSpeechSynthesizer*);
</span><span class="cx">     ~PlatformSpeechSynthesisProviderEfl();
</span><span class="cx"> 
</span><span class="lines">@@ -48,7 +58,19 @@
</span><span class="cx">     void speak(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;);
</span><span class="cx">     void cancel();
</span><span class="cx"> private:
</span><ins>+    bool engineInit();
+
+    int convertRateToEspeakValue(float) const;
+    int convertVolumeToEspeakValue(float) const;
+    int convertPitchToEspeakValue(float) const;
+
+    espeak_VOICE* currentVoice() const;
+    String voiceName(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt;) const;
+    void fireSpeechEvent(SpeechEvent);
+
+    bool m_isEngineStarted;
</ins><span class="cx">     PlatformSpeechSynthesizer* m_platformSpeechSynthesizer;
</span><ins>+    RefPtr&lt;PlatformSpeechSynthesisUtterance&gt; m_utterance;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformeflPlatformSpeechSynthesizerEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesizerEfl.cpp (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesizerEfl.cpp        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Source/WebCore/platform/efl/PlatformSpeechSynthesizerEfl.cpp        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -38,7 +38,6 @@
</span><span class="cx">     : m_voiceListIsInitialized(false)
</span><span class="cx">     , m_speechSynthesizerClient(client)
</span><span class="cx">     , m_platformSpeechWrapper(std::make_unique&lt;PlatformSpeechSynthesisProviderEfl&gt;(this))
</span><del>-
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -48,26 +47,31 @@
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizer::initializeVoiceList()
</span><span class="cx"> {
</span><ins>+    ASSERT(m_platformSpeechWrapper);
</ins><span class="cx">     m_platformSpeechWrapper-&gt;initializeVoiceList(m_voiceList);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizer::pause()
</span><span class="cx"> {
</span><ins>+    ASSERT(m_platformSpeechWrapper);
</ins><span class="cx">     m_platformSpeechWrapper-&gt;pause();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizer::resume()
</span><span class="cx"> {
</span><ins>+    ASSERT(m_platformSpeechWrapper);
</ins><span class="cx">     m_platformSpeechWrapper-&gt;resume();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizer::speak(PassRefPtr&lt;PlatformSpeechSynthesisUtterance&gt; utterance)
</span><span class="cx"> {
</span><ins>+    ASSERT(m_platformSpeechWrapper);
</ins><span class="cx">     m_platformSpeechWrapper-&gt;speak(utterance);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PlatformSpeechSynthesizer::cancel()
</span><span class="cx"> {
</span><ins>+    ASSERT(m_platformSpeechWrapper);
</ins><span class="cx">     m_platformSpeechWrapper-&gt;cancel();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourcecmakeFindEspeakcmake"></a>
<div class="addfile"><h4>Added: trunk/Source/cmake/FindEspeak.cmake (0 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/FindEspeak.cmake                                (rev 0)
+++ trunk/Source/cmake/FindEspeak.cmake        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+# - Try to find Espeak
+# Once done, this will define
+#
+#  ESPEAK_INCLUDE_DIRS - the Espeak include drectories
+#  ESPEAK_LIBRARIES - link these to use Espeak
+#
+# Copyright (C) 2014 Samsung Electronics
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``A
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+find_path(ESPEAK_INCLUDE_DIRS
+    NAMES speak_lib.h
+    PATH_SUFFIXES espeak
+)
+
+find_library(ESPEAK_LIBRARIES
+    NAMES espeak
+)
+
+mark_as_advanced(
+    ESPEAK_INCLUDE_DIRS
+    ESPEAK_LIBRARIES
+)
</ins></span></pre></div>
<a id="trunkSourcecmakeOptionsEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/cmake/OptionsEfl.cmake (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/cmake/OptionsEfl.cmake        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Source/cmake/OptionsEfl.cmake        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -312,6 +312,7 @@
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><span class="cx"> if (ENABLE_SPEECH_SYNTHESIS)
</span><ins>+    find_package(Espeak REQUIRED)
</ins><span class="cx">     add_definitions(-DENABLE_SPEECH_SYNTHESIS=1)
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Tools/ChangeLog        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-08-26  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
+
+        [EFL] Utilize espeak as a synthesizer back-end for WebSpeech
+        https://bugs.webkit.org/show_bug.cgi?id=136127
+
+        Reviewed by Gyuyoung Kim.
+
+        Add espeak dependency.
+
+        * efl/install-dependencies:
+
</ins><span class="cx"> 2014-08-25  Alexey Proskuryakov  &lt;ap@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove a little more accidentally landed code from r172891.
</span></span></pre></div>
<a id="trunkToolseflinstalldependencies"></a>
<div class="modfile"><h4>Modified: trunk/Tools/efl/install-dependencies (172955 => 172956)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/efl/install-dependencies        2014-08-26 11:18:10 UTC (rev 172955)
+++ trunk/Tools/efl/install-dependencies        2014-08-26 11:25:49 UTC (rev 172956)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx">         libc++abi-dev \
</span><span class="cx">         libdbus-1-dev \
</span><span class="cx">         libenchant-dev \
</span><ins>+        libespeak-dev \
</ins><span class="cx">         libfaad-dev \
</span><span class="cx">         libffi-dev \
</span><span class="cx">         libfreetype6-dev \
</span></span></pre>
</div>
</div>

</body>
</html>