Browse Source

修改名称、包名

newdev_shunjiawei
tanlongsheng 2 years ago
parent
commit
7eb6ff01f6
  1. 4
      ios/Runner/BluetoothMediaButtonHelper.swift
  2. 2
      ios/Runner/Info.plist
  3. 15
      lib/data/services/speech_impl/volcano_asr_api_service.dart
  4. 2
      lib/main.dart
  5. 2
      lib/modules/chat/views/chat_view.dart
  6. 6
      macos/Runner.xcodeproj/project.pbxproj
  7. 2
      macos/Runner/Configs/AppInfo.xcconfig

4
ios/Runner/BluetoothMediaButtonHelper.swift

@ -230,8 +230,8 @@ class BluetoothMediaButtonHelper: NSObject, AVAudioPlayerDelegate {
// 创建音频专辑图片
let albumArt = UIImage(named: "AppIcon") // 使用应用图标作为专辑图片
var nowPlayingInfo: [String: Any] = [
MPMediaItemPropertyTitle: "DeepVoice 语音助手",
MPMediaItemPropertyArtist: "DeepVoice",
MPMediaItemPropertyTitle: "DeepSound 语音助手",
MPMediaItemPropertyArtist: "DeepSound",
MPNowPlayingInfoPropertyPlaybackRate: isPlaying ? 1.0 : 0.0, // 1.0表示正在播放
MPNowPlayingInfoPropertyElapsedPlaybackTime: currentPlaybackTime,
MPMediaItemPropertyPlaybackDuration: totalDuration

2
ios/Runner/Info.plist

@ -7,7 +7,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Deep Voice</string>
<string>DeepSound</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>

15
lib/data/services/speech_impl/volcano_asr_api_service.dart

@ -262,7 +262,8 @@ class VolcanoAsrApiService implements AsrService {
_hostUrl = dotenv.env['VOLCANO_HOST_URL'] ?? 'ws-api-asr.volces.com';
if (_appKey.isEmpty || _secretKey.isEmpty || _serviceId.isEmpty) {
throw Exception('未找到火山语音API配置,请在.env文件中设置VOLCANO_APP_KEY, VOLCANO_SECRET_KEY和VOLCANO_SERVICE_ID');
throw Exception(
'未找到火山语音API配置,请在.env文件中设置VOLCANO_APP_KEY, VOLCANO_SECRET_KEY和VOLCANO_SERVICE_ID');
}
}
@ -379,7 +380,7 @@ class VolcanoAsrApiService implements AsrService {
// 构建请求头
final headers = <String, String>{
'User-Agent': 'Deep Voice App/1.0.0',
'User-Agent': 'DeepSound App/1.0.0',
};
return (url, kIsWeb ? null : headers);
@ -649,7 +650,8 @@ class VolcanoAsrApiService implements AsrService {
/// 处理结果消息
void _handleResultMessage(Map<String, dynamic> data) {
try {
final Map<String, dynamic>? result = data['result'] as Map<String, dynamic>?;
final Map<String, dynamic>? result =
data['result'] as Map<String, dynamic>?;
if (result == null) return;
final bool isEnd = result['is_end'] as bool? ?? false;
@ -693,7 +695,8 @@ class VolcanoAsrApiService implements AsrService {
Logger.error('语音识别开始失败: [$code] $message');
if (_recognitionController != null && !_recognitionController!.isClosed) {
_recognitionController!.add(RecognitionEvent.error('开始失败: [$code] $message'));
_recognitionController!
.add(RecognitionEvent.error('开始失败: [$code] $message'));
}
}
}
@ -759,7 +762,9 @@ class VolcanoAsrApiService implements AsrService {
}
// 通知会话已结束
if (_recognitionController != null && !_recognitionController!.isClosed && !_isRecognitionEndRequested) {
if (_recognitionController != null &&
!_recognitionController!.isClosed &&
!_isRecognitionEndRequested) {
_recognitionController!.add(RecognitionEvent(
type: RecognitionEventType.sessionStopped,
));

2
lib/main.dart

@ -30,7 +30,7 @@ void main() async {
const double width = 375.0;
const double height = 812.0;
setWindowTitle('Deep Voice');
setWindowTitle('DeepSound');
setWindowMinSize(const Size(width, height));
setWindowMaxSize(const Size(width, height));

2
lib/modules/chat/views/chat_view.dart

@ -2,11 +2,9 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'dart:math';
import 'package:audio_waveforms/audio_waveforms.dart';
import '../controllers/chat_controller.dart';
import '../models/message_model.dart';
import '../../../core/theme/app_colors.dart';
import '../../../core/widgets/message_bubble.dart';
class ChatView extends GetView<ChatController> {
const ChatView({Key? key}) : super(key: key);

6
macos/Runner.xcodeproj/project.pbxproj

@ -479,7 +479,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.deepVoice.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.yunqiinnovation.deepsound.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/deep_voice.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/deep_voice";
@ -494,7 +494,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.deepVoice.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.yunqiinnovation.deepsound.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/deep_voice.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/deep_voice";
@ -509,7 +509,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.deepVoice.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.yunqiinnovation.deepsound.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/deep_voice.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/deep_voice";

2
macos/Runner/Configs/AppInfo.xcconfig

@ -8,7 +8,7 @@
PRODUCT_NAME = deep_voice
// The application's bundle identifier
PRODUCT_BUNDLE_IDENTIFIER = com.example.deepVoice
PRODUCT_BUNDLE_IDENTIFIER = com.yunqiinnovation.deepsound
// The copyright displayed in application information
PRODUCT_COPYRIGHT = Copyright © 2025 com.example. All rights reserved.

Loading…
Cancel
Save