constants.dart 701 B

1234567891011121314151617
  1. import 'dart:io';
  2. abstract final class AppConstants {
  3. static String get defaultHost =>
  4. Platform.isAndroid ? '192.168.199.195' : '127.0.0.1';
  5. static const defaultPort = 8765;
  6. static const targetSampleRate = 16000;
  7. static const bufferSize = 4096;
  8. static const transcribeInterval = Duration(seconds: 2);
  9. static const audioSendInterval = Duration(milliseconds: 300);
  10. static const maxAudioChunkBytes = 16000;
  11. static const pingInterval = Duration(seconds: 30);
  12. static const reconnectBaseDelay = Duration(seconds: 1);
  13. static const reconnectMaxDelay = Duration(seconds: 30);
  14. static const appName = '检测数据采集';
  15. static const defaultLiveKitUrl = 'ws://localhost:7888';
  16. }