Index: chrome/browser/speech/tts_win.cc |
diff --git a/chrome/browser/speech/tts_win.cc b/chrome/browser/speech/tts_win.cc |
index d2d5153f8d312735e43a42b9c57c10c447173e98..c8665c5f14022747899f6619c55b8a606185440e 100644 |
--- a/chrome/browser/speech/tts_win.cc |
+++ b/chrome/browser/speech/tts_win.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include <math.h> |
+#include <objbase.h> |
#include <sapi.h> |
#include <sphelper.h> |
#include <stdint.h> |
@@ -317,7 +318,8 @@ TtsPlatformImplWin::TtsPlatformImplWin() |
stream_number_(0), |
char_position_(0), |
paused_(false) { |
- speech_synthesizer_.CreateInstance(CLSID_SpVoice); |
+ ::CoCreateInstance(CLSID_SpVoice, nullptr, CLSCTX_ALL, |
+ IID_PPV_ARGS(&speech_synthesizer_)); |
if (speech_synthesizer_.Get()) { |
ULONGLONG event_mask = |
SPFEI(SPEI_START_INPUT_STREAM) | |