PlatformSpeechSynthesizerEfl.cpp [plain text]
#include "config.h"
#include "PlatformSpeechSynthesizer.h"
#if ENABLE(SPEECH_SYNTHESIS)
#include <PlatformSpeechSynthesisProviderEfl.h>
#include <PlatformSpeechSynthesisUtterance.h>
#include <PlatformSpeechSynthesisVoice.h>
namespace WebCore {
PlatformSpeechSynthesizer::PlatformSpeechSynthesizer(PlatformSpeechSynthesizerClient* client)
: m_voiceListIsInitialized(false)
, m_speechSynthesizerClient(client)
, m_platformSpeechWrapper(std::make_unique<PlatformSpeechSynthesisProviderEfl>(this))
{
}
PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer()
{
}
void PlatformSpeechSynthesizer::initializeVoiceList()
{
ASSERT(m_platformSpeechWrapper);
m_platformSpeechWrapper->initializeVoiceList(m_voiceList);
}
void PlatformSpeechSynthesizer::pause()
{
ASSERT(m_platformSpeechWrapper);
m_platformSpeechWrapper->pause();
}
void PlatformSpeechSynthesizer::resume()
{
ASSERT(m_platformSpeechWrapper);
m_platformSpeechWrapper->resume();
}
void PlatformSpeechSynthesizer::speak(RefPtr<PlatformSpeechSynthesisUtterance>&& utterance)
{
ASSERT(m_platformSpeechWrapper);
m_platformSpeechWrapper->speak(WTFMove(utterance));
}
void PlatformSpeechSynthesizer::cancel()
{
ASSERT(m_platformSpeechWrapper);
m_platformSpeechWrapper->cancel();
}
}
#endif // ENABLE(SPEECH_SYNTHESIS)