Skip to content

Result returned from google.cloud.speech.sample.Sample.streaming_recognize #3166

@cgratie

Description

@cgratie

The streaming_recognize method of Sample computes its output as follows:

        for response in responses:
            for result in response.results:
                if result.is_final or interim_results:
                    yield StreamingSpeechResult.from_pb(result)

Thus, it returns a generator where results are no longer grouped by response. I feel that this makes it more difficult for the end user to use the results, since results from the same response should be concatenated in order to obtain the complete transcript of the fragment transcribed so far.

Metadata

Metadata

Assignees

Labels

api: speechIssues related to the Speech-to-Text API.priority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions