パッケージ、リポジトリ、アプリカテゴリを検索

GitHub リポジトリposhie0456/DartPositiveVibesGenerator

DartPositiveVibesGenerator

テキストから音声への変換および肯定文生成のためのDartサービス

DartPositiveVibesGenerator のプロジェクト画像
スター
1
フォーク
0
最終プッシュ(UTC)
2024/12/15
プロジェクト状態
公開中

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

DartPositiveVibesGenerator

Dart Service for Text-to-Speech and Affirmation Generation

This Dart service provides functionality for generating affirmations and converting them to speech. The service interacts with two APIs:

  1. Generative Language API for generating affirmation content.
  2. Eleven Labs API for converting text to speech.

Features

  • Text Generation: Randomly selects an affirmation prompt or uses custom input to generate a text response.
  • Text-to-Speech: Converts the generated affirmation text into speech and saves it as an MP3 file.

Setup

  1. API Keys: Replace the APIKEY and Eleven Labs API key with your own credentials.

    • For the Generative Language API, provide your API key from Google Cloud.
    • For Eleven Labs, obtain your voice_id and API key for text-to-speech functionality.
  2. Dependencies:

    • http: For making HTTP requests.
    • path_provider: To save the MP3 file to a local directory.
    • audioplayers: To play the generated audio file.

Example Usage

https://github.com/user-attachments/assets/66428673-9781-42b3-9633-5a2b1880857f

final service = Service();

// Generate and print an affirmation
String affirmation = await service.textGeneration();
print(affirmation);

// Generate speech from the affirmation and save as MP3
String audioFilePath = await service.generateAndPlaySpeech(affirmation);
print("Audio saved at $audioFilePath");
Tarik Panday GitHub avatar
GitHub 作者

Tarik Panday ↗

Full Stack Mobile developer Proficient in: Flutter, NodeJS, Firebase, Python, MongoDB

South Africa, Gauteng, Midrand
言語Dart

カテゴリー

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗