Skip to content

プレミアム音声廃止 - #4046

Merged
TinyKitten merged 1 commit into
devfrom
feature/tts
Feb 1, 2025
Merged

TinyKitten merged 1 commit into
devfrom
feature/tts

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Feb 1, 2025 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • プレミアム音声アナウンスに関する表示と説明文が削除され、関連オプションが廃止されました。
    • 設定画面からロスレス音声の切替オプションが削除され、音声設定がよりシンプルになりました。

@TinyKitten TinyKitten self-assigned this Feb 1, 2025
@coderabbitai

coderabbitai Bot commented Feb 1, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

この変更では、プレミアム音声アナウンス(lossless 機能)の実装を全面的に削除しています。JSON 翻訳ファイルから対応する文言が除去され、TTS API 呼び出しや音声設定のロジックも簡素化されています。特に、非同期ループの処理方法が forEach から for...of に変更され、音声合成で使用するボイス名が固定値に置き換えられました。また、アプリ設定、非同期ストレージ、Recoil 状態からプレミアム関連のパラメータが削除されています。

Changes

File(s) Change Summary
assets/translations/en.json
assets/translations/ja.json
プレミアム音声アナウンス機能に関する翻訳文言 (autoAnnounceLosslessTitle) を削除
functions/src/index.ts detectHourlyAppStoreNewReview 関数で非同期処理を for...of ループに変更
tts 関数で条件分岐を削除し、固定ボイス名 (ja-JP-Standard-B, en-US-Standard-G) を使用
isPremium 変数の削除
src/components/Permitted.tsx loadSettingsAsync 内で lossless 音声設定の取得処理を削除
src/constants/asyncStorage.ts ASYNC_STORAGE_KEYS から LOSSLESS_ENABLED、LOSSLESS_NOTICE、QA_LOSSLESS_ENABLED を削除
src/hooks/useTTS.ts losslessEnabled プロパティの削除と、TTS API リクエストから premium フィールドを除去
依存配列の簡素化
src/screens/AppSettings/index.tsx lossless 音声状態管理のロジックと対応するイベントハンドラ (onLosslessAudioEnabledValueChange) を削除
ナビゲーション呼び出しの型アサーションを更新
src/store/atoms/speech.ts StationState インターフェイスから losslessEnabled プロパティを削除

Sequence Diagram(s)

sequenceDiagram
    participant F as detectHourlyAppStoreNewReview
    participant R as ReviewsArray
    participant W as Webhook Service

    F->>R: for...of ループで各レビューを処理
    loop 各レビュー処理
        F->>W: 非同期で Webhook リクエスト送信
        W-->>F: レスポンス受信
    end
Loading
sequenceDiagram
    participant U as ユーザー
    participant T as TTS(useTTS / fetchSpeech)
    participant API as TTS API

    U->>T: 音声合成リクエスト
    T->>API: 固定ボイス名(ja-JP-Standard-B / en-US-Standard-G)で API 呼び出し
    API-->>T: 音声データ返却
    T-->>U: 合成音声を返送
Loading

Suggested labels

react

Poem

みんなのコードに春風が吹く
プレミアムさよなら、静かな道
新しい流れで心が躍る
ひらひらと舞う削除の花びら
私ウサギもにっこり、頑張る🐰
今日も一歩、未来へ踏み出す!

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/screens/AppSettings/index.tsx (1)

110-114: 型安全性の改善を検討してください

as neverによるタイプキャストは型安全性を損なう可能性があります。ナビゲーション型の適切な定義を検討してください。

-const toThemeSettings = () => navigation.navigate('ThemeSettings' as never);
+type RootStackParamList = {
+  ThemeSettings: undefined;
+  EnabledLanguagesSettings: undefined;
+  TuningSettings: undefined;
+};
+const navigation = useNavigation<NavigationProp<RootStackParamList>>();
+const toThemeSettings = () => navigation.navigate('ThemeSettings');
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc0409d and cda91ba.

📒 Files selected for processing (8)
  • assets/translations/en.json (0 hunks)
  • assets/translations/ja.json (0 hunks)
  • functions/src/index.ts (2 hunks)
  • src/components/Permitted.tsx (0 hunks)
  • src/constants/asyncStorage.ts (0 hunks)
  • src/hooks/useTTS.ts (2 hunks)
  • src/screens/AppSettings/index.tsx (3 hunks)
  • src/store/atoms/speech.ts (1 hunks)
💤 Files with no reviewable changes (4)
  • assets/translations/en.json
  • assets/translations/ja.json
  • src/components/Permitted.tsx
  • src/constants/asyncStorage.ts
🔇 Additional comments (6)
src/store/atoms/speech.ts (1)

15-17: 実装はクリーンで問題ありません!

プレミアム音声機能の削除に伴い、ステート管理が適切に簡素化されています。

src/hooks/useTTS.ts (2)

15-16: ステート管理の変更が適切に実装されています!

プレミアム音声機能の削除に伴い、speechStateの分割代入が正しく更新されています。


135-135: 依存配列の更新が適切です!

fetchSpeech関数の依存配列からlosslessEnabledが適切に削除されています。

src/screens/AppSettings/index.tsx (1)

49-50: ステート管理の簡素化が適切に実装されています!

プレミアム音声機能の削除に伴い、speechStateの分割代入が正しく更新されています。

functions/src/index.ts (2)

107-114: 非同期処理の改善が適切に実装されています!

forEachからfor...ofへの変更により、非同期処理の制御が改善されています。これにより、各レビューの処理が確実に順番に実行されます。


204-205: 音声選択の簡素化が適切に実装されています!

プレミアム音声機能の削除に伴い、音声選択ロジックが適切に簡素化されています。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant