Commit 60254bf8 authored by Evan Liu's avatar Evan Liu Committed by Commit Bot

Update the SODA config file path for Windows

This CL updates the speech recognition recognizer to be compatible with
Windows. Chromium uses std::wstring for file paths; however, wide
characters should not be passed across API boundaries, so they must
be converted to plain C-style characters before being passed into the
SODA DLL.

Bug: 1116563
Change-Id: I920a994706fe9212b8ed50ecd5c6371090509e9a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357609Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Commit-Queue: Evan Liu <evliu@google.com>
Cr-Commit-Position: refs/heads/master@{#798958}
parent 6a03d956
...@@ -131,7 +131,7 @@ void SpeechRecognitionRecognizerImpl::SendAudioToSpeechRecognitionService( ...@@ -131,7 +131,7 @@ void SpeechRecognitionRecognizerImpl::SendAudioToSpeechRecognitionService(
soda_client_->DidAudioPropertyChange(sample_rate, channel_count)) { soda_client_->DidAudioPropertyChange(sample_rate, channel_count)) {
// Initialize the SODA instance. // Initialize the SODA instance.
auto api_key = google_apis::GetSodaAPIKey(); auto api_key = google_apis::GetSodaAPIKey();
auto config_file_path = config_path_.value(); std::string config_file_path = config_path_.AsUTF8Unsafe();
SodaConfig config; SodaConfig config;
config.channel_count = channel_count; config.channel_count = channel_count;
config.sample_rate = sample_rate; config.sample_rate = sample_rate;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment