Conversation
Summary of ChangesHello @rudrankriyam, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on refining the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the SpeechFramework.md documentation. While the changes to DictationTranscriber and SpeechTranscriber are good cleanups, the modifications to SpeechDetector introduce significant issues. Specifically, removing its conformance to SpeechModule makes the documentation inconsistent with the provided Swift source code, which expects SpeechDetector to be a SpeechModule. Additionally, public properties on SpeechDetector have had their documentation removed, which reduces API clarity. I've added comments with suggestions to address these issues.
| @available(tvOS, unavailable) | ||
| @available(watchOS, unavailable) | ||
| final public class SpeechDetector : SpeechModule { | ||
| final public class SpeechDetector { |
There was a problem hiding this comment.
Removing SpeechModule conformance from SpeechDetector makes this documentation inconsistent with the provided source code. The implementation in Sources/AuralKit/SpeechSession+Transcriber.swift (lines 48-58) explicitly casts SpeechDetector to any SpeechModule to use it with SpeechAnalyzer. This change will cause confusion for developers and likely reflects an error in the documentation update. If SpeechDetector is no longer a SpeechModule, the implementation code must be updated accordingly. Otherwise, this documentation change should be reverted.
| final public class SpeechDetector { | |
| final public class SpeechDetector : SpeechModule { |
|
|
||
| If there is an error in the overall analysis, all modules will throw the error from their individual result sequence. | ||
| */ | ||
| final public var results: some Sendable & AsyncSequence<SpeechDetector.Result, any Error> { get } |
There was a problem hiding this comment.
The documentation for the public results property has been removed. All public APIs should be documented to maintain clarity. Please restore the documentation for this property. A more specific comment explaining that results are only available when reportResults is enabled during initialization would be even more helpful.
| final public var results: some Sendable & AsyncSequence<SpeechDetector.Result, any Error> { get } | |
| /** | |
| An asynchronous sequence containing this module's analysis results. Results are added to the sequence as they are created. | |
| Each module has its own result sequence and data structure. | |
| If there is an error in the overall analysis, all modules will throw the error from their individual result sequence. | |
| */ | |
| final public var results: some Sendable & AsyncSequence<SpeechDetector.Result, any Error> { get } |
|
|
||
| This property may be accessed before the module is added to the analyzer. | ||
| */ | ||
| final public var availableCompatibleAudioFormats: [AVAudioFormat] { get } |
There was a problem hiding this comment.
The documentation for the public availableCompatibleAudioFormats property has been removed. To ensure the API remains self-documenting and easy to understand, please restore the documentation for this property.
| final public var availableCompatibleAudioFormats: [AVAudioFormat] { get } | |
| /** | |
| The audio formats that this module is able to analyze, given its configuration. | |
| If the audio format doesn't matter, then there will be one format listed with a sample rate of `kAudioStreamAnyRate` and other values 0. | |
| If assets are necessary yet not installed on device, then the list will be empty. | |
| This property may be accessed before the module is added to the analyzer. | |
| */ | |
| final public var availableCompatibleAudioFormats: [AVAudioFormat] { get } |
No description provided.