* docs: add PT v2 and token-info-feedback design docs - Add phonetic-transcription-v2-design.instructions.md (client PT v2 migration) - Add token-info-feedback-v2.instructions.md (client token feedback v2 migration) * fix: update applyTo path for token info feedback v2 migration * feat: Refactor phonetic transcription to v2 models and repository (in progress) * feat: PT v2 migration - tts_phoneme rename, v1 cleanup, disambiguation, TTS integration * feat: Update phonetic transcription v2 design document for endpoint changes and response structure * docs: fix stale _storageKeys claim in pt-v2 design doc * style: reformat PT v2 files with Dart 3.10 formatter (Flutter 3.38) * feat: add speakingRate to TTS request model (default 0.85) Passes speaking_rate to the choreo TTS endpoint. Default preserves current behavior; can be overridden for single-word playback later. * feat: use normal speed (1.0) for single-word TTS playback The 0.85x slowdown is helpful for full sentences but makes single words sound unnaturally slow. tts_controller._speakFromChoreo now sends speakingRate=1.0. Full-sentence TTS via pangea_message_event still defaults to 0.85. * style: clean up formatting and reduce line breaks in TtsController * fix: env goofiness * formatting, fix linter issues * don't return widgets from functions --------- Co-authored-by: ggurdin <ggurdin@gmail.com> Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
96 lines
3.9 KiB
Dart
96 lines
3.9 KiB
Dart
//TODO move baseAPI addition to request function
|
|
|
|
import 'package:fluffychat/pangea/common/config/environment.dart';
|
|
|
|
/// autodocs
|
|
/// https://api.staging.pangea.chat/choreo/docs
|
|
/// username: admin
|
|
/// password: admin
|
|
///
|
|
/// https://api.staging.pangea.chat/api/v1/
|
|
class PApiUrls {
|
|
static const String _choreoPrefix = "/choreo";
|
|
static const String _subscriptionPrefix = "/subscription";
|
|
|
|
static String get _choreoEndpoint =>
|
|
"${Environment.choreoApi}${PApiUrls._choreoPrefix}";
|
|
static String get _subscriptionEndpoint =>
|
|
"${Environment.choreoApi}${PApiUrls._subscriptionPrefix}";
|
|
|
|
/// ---------------------- Util --------------------------------------
|
|
static String appVersion = "${PApiUrls._choreoEndpoint}/version";
|
|
|
|
/// ---------------------- Languages --------------------------------------
|
|
static String getLanguages = "${PApiUrls._choreoEndpoint}/languages_v2";
|
|
|
|
/// ---------------------- Users --------------------------------------
|
|
static String paymentLink = "${PApiUrls._subscriptionEndpoint}/payment_link";
|
|
|
|
static String languageDetection =
|
|
"${PApiUrls._choreoEndpoint}/language_detection";
|
|
|
|
static String igcLite = "${PApiUrls._choreoEndpoint}/grammar_v2";
|
|
static String spanDetails = "${PApiUrls._choreoEndpoint}/span_details";
|
|
|
|
static String simpleTranslation =
|
|
"${PApiUrls._choreoEndpoint}/translation/direct";
|
|
static String tokenize = "${PApiUrls._choreoEndpoint}/tokenize";
|
|
static String contextualDefinition =
|
|
"${PApiUrls._choreoEndpoint}/contextual_definition";
|
|
|
|
static String firstStep = "${PApiUrls._choreoEndpoint}/it_initialstep";
|
|
|
|
static String textToSpeech = "${PApiUrls._choreoEndpoint}/text_to_speech";
|
|
static String speechToText = "${PApiUrls._choreoEndpoint}/speech_to_text";
|
|
static String phoneticTranscription =
|
|
"${PApiUrls._choreoEndpoint}/phonetic_transcription";
|
|
static String phoneticTranscriptionV2 =
|
|
"${PApiUrls._choreoEndpoint}/phonetic_transcription_v2";
|
|
|
|
static String messageActivityGeneration =
|
|
"${PApiUrls._choreoEndpoint}/practice";
|
|
|
|
static String lemmaDictionary =
|
|
"${PApiUrls._choreoEndpoint}/lemma_definition";
|
|
static String morphDictionary = "${PApiUrls._choreoEndpoint}/morph_meaning";
|
|
|
|
// static String activityPlan = "${PApiUrls._choreoEndpoint}/activity_plan";
|
|
// static String activityPlanGeneration =
|
|
// "${PApiUrls._choreoEndpoint}/activity_plan/generate";
|
|
// static String activityPlanSearch =
|
|
// "${PApiUrls._choreoEndpoint}/activity_plan/search";
|
|
// static String activityModeList = "${PApiUrls._choreoEndpoint}/modes";
|
|
// static String objectiveList = "${PApiUrls._choreoEndpoint}/objectives";
|
|
// static String topicList = "${PApiUrls._choreoEndpoint}/topics";
|
|
|
|
static String activitySummary =
|
|
"${PApiUrls._choreoEndpoint}/activity_summary";
|
|
|
|
static String activityFeedback =
|
|
"${PApiUrls._choreoEndpoint}/activity_plan/feedback";
|
|
|
|
static String tokenFeedback = "${PApiUrls._choreoEndpoint}/token/feedback";
|
|
static String tokenFeedbackV2 =
|
|
"${PApiUrls._choreoEndpoint}/token/feedback_v2";
|
|
|
|
static String morphFeaturesAndTags = "${PApiUrls._choreoEndpoint}/morphs";
|
|
static String constructSummary =
|
|
"${PApiUrls._choreoEndpoint}/construct_summary";
|
|
|
|
///--------------------------- course translations ---------------------------
|
|
static String getLocalizedCourse =
|
|
"${PApiUrls._choreoEndpoint}/course_plans/localize";
|
|
static String getLocalizedTopic =
|
|
"${PApiUrls._choreoEndpoint}/topics/localize";
|
|
static String getLocalizedActivity =
|
|
"${PApiUrls._choreoEndpoint}/activity_plan/localize";
|
|
|
|
///-------------------------------- revenue cat --------------------------
|
|
static String rcAppsChoreo = "${PApiUrls._subscriptionEndpoint}/app_ids";
|
|
static String rcProductsChoreo =
|
|
"${PApiUrls._subscriptionEndpoint}/all_products";
|
|
static String rcProductsTrial =
|
|
"${PApiUrls._subscriptionEndpoint}/free_trial";
|
|
|
|
static String rcSubscription = PApiUrls._subscriptionEndpoint;
|
|
}
|