@@ -35,9 +35,6 @@ using net::URLFetcher;
35
35
36
36
namespace {
37
37
38
- // TODO(primiano): This shouldn't be a const, rather it should be taken from
39
- // maxNBest property (which is not yet implemented in WebKit).
40
- const int kMaxResults = 5 ;
41
38
const char kDownstreamUrl [] = " /down?" ;
42
39
const char kUpstreamUrl [] = " /up?" ;
43
40
const int kAudioPacketIntervalMs = 100 ;
@@ -322,8 +319,6 @@ GoogleStreamingRemoteEngine::ConnectBothStreams(const FSMEventArgs&) {
322
319
std::vector<std::string> downstream_args;
323
320
downstream_args.push_back (" sky=" + GetWebserviceKey ());
324
321
downstream_args.push_back (" pair=" + request_key);
325
- downstream_args.push_back (" maxresults=" + base::IntToString (kMaxResults ));
326
-
327
322
GURL downstream_url (GetWebserviceBaseURL () + std::string (kDownstreamUrl ) +
328
323
JoinString (downstream_args, ' &' ));
329
324
// TODO(primiano): /////////// Remove this after debug stage. /////////////
@@ -347,9 +342,12 @@ GoogleStreamingRemoteEngine::ConnectBothStreams(const FSMEventArgs&) {
347
342
" lang=" + net::EscapeQueryParamValue (GetAcceptedLanguages (), true ));
348
343
upstream_args.push_back (
349
344
config_.filter_profanities ? " pfilter=2" : " pfilter=0" );
350
- upstream_args.push_back (" maxresults=" + base::IntToString (kMaxResults ));
345
+ if (config_.max_hypotheses > 0U ) {
346
+ upstream_args.push_back (" maxresults=" +
347
+ base::UintToString (config_.max_hypotheses ));
348
+ }
349
+ // TODO(primiano) What is this client= parameter? Check with speech team.
351
350
upstream_args.push_back (" client=myapp.mycompany.com" );
352
- // TODO(primiano): Can we remove this feature sending audio HW information?
353
351
if (!config_.hardware_info .empty ()) {
354
352
upstream_args.push_back (
355
353
" xhw=" + net::EscapeQueryParamValue (config_.hardware_info , true ));
0 commit comments