Skip to content

Commit

Permalink
fix: revert record library (didn't work on macOS)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasn committed Dec 31, 2023
1 parent 9da7022 commit d89b8b9
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 59 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,7 @@ macos_open: macos_build macos_archive
get_whisper_cpp:
cd macos/whisper.cpp/ && \
wget -nc https://github.com/ggerganov/whisper.cpp/archive/refs/tags/v$(WHISPER_CPP_VERSION).zip && \
unzip v$(WHISPER_CPP_VERSION).zip && \
cp ./whisper.cpp-$(WHISPER_CPP_VERSION)/ggml.c . && \
cp ./whisper.cpp-$(WHISPER_CPP_VERSION)/ggml.h . && \
cp ./whisper.cpp-$(WHISPER_CPP_VERSION)/whisper.cpp . && \
cp ./whisper.cpp-$(WHISPER_CPP_VERSION)/whisper.h .
unzip v$(WHISPER_CPP_VERSION).zip

.PHONY: get_whisper_cpp_ios
get_whisper_cpp_ios:
Expand Down
11 changes: 5 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ PODS:
- Flutter
- MTBBarcodeScanner
- ReachabilitySwift (5.0.0)
- record_darwin (1.0.0):
- record (0.0.1):
- Flutter
- FlutterMacOS
- SDWebImage (5.16.0):
- SDWebImage/Core (= 5.16.0)
- SDWebImage/Core (5.16.0)
Expand Down Expand Up @@ -138,7 +137,7 @@ DEPENDENCIES:
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- photo_manager (from `.symlinks/plugins/photo_manager/ios`)
- qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
- record_darwin (from `.symlinks/plugins/record_darwin/ios`)
- record (from `.symlinks/plugins/record/ios`)
- share_plus (from `.symlinks/plugins/share_plus/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
Expand Down Expand Up @@ -207,8 +206,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/photo_manager/ios"
qr_code_scanner:
:path: ".symlinks/plugins/qr_code_scanner/ios"
record_darwin:
:path: ".symlinks/plugins/record_darwin/ios"
record:
:path: ".symlinks/plugins/record/ios"
share_plus:
:path: ".symlinks/plugins/share_plus/ios"
shared_preferences_foundation:
Expand Down Expand Up @@ -253,7 +252,7 @@ SPEC CHECKSUMS:
photo_manager: 4f6810b7dfc4feb03b461ac1a70dacf91fba7604
qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
record_darwin: 1f6619f2abac4d1ca91d3eeab038c980d76f1517
record: cae05d8dd3cdb1dea3511b20e5a5811a1ae00d0d
SDWebImage: 2aea163b50bfcb569a2726b6a754c54a4506fcf6
SDWebImageWebPCoder: f0f287cee4cd96a59937fbf3c77a8cfda9ba67b0
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
Expand Down
4 changes: 2 additions & 2 deletions lib/blocs/audio/recorder_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AudioRecorderCubit extends Cubit<AudioRecorderState> {
});
}

final _audioRecorder = AudioRecorder();
final _audioRecorder = Record();
StreamSubscription<Amplitude>? _amplitudeSub;
final LoggingDb _loggingDb = getIt<LoggingDb>();
final PersistenceLogic persistenceLogic = getIt<PersistenceLogic>();
Expand Down Expand Up @@ -73,7 +73,7 @@ class AudioRecorderCubit extends Cubit<AudioRecorderState> {
);

await _audioRecorder.start(
const RecordConfig(sampleRate: 48000),
samplingRate: 48000,
path: filePath,
);
}
Expand Down
4 changes: 2 additions & 2 deletions macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import package_info_plus
import pasteboard
import path_provider_foundation
import photo_manager
import record_darwin
import record_macos
import screen_retriever
import share_plus
import shared_preferences_foundation
Expand All @@ -44,7 +44,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
PhotoManagerPlugin.register(with: registry.registrar(forPlugin: "PhotoManagerPlugin"))
RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin"))
RecordMacosPlugin.register(with: registry.registrar(forPlugin: "RecordMacosPlugin"))
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
Expand Down
11 changes: 5 additions & 6 deletions macos/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ PODS:
- Flutter
- FlutterMacOS
- ReachabilitySwift (5.0.0)
- record_darwin (1.0.0):
- Flutter
- record_macos (0.2.0):
- FlutterMacOS
- screen_retriever (0.0.1):
- FlutterMacOS
Expand Down Expand Up @@ -97,7 +96,7 @@ DEPENDENCIES:
- pasteboard (from `Flutter/ephemeral/.symlinks/plugins/pasteboard/macos`)
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
- photo_manager (from `Flutter/ephemeral/.symlinks/plugins/photo_manager/macos`)
- record_darwin (from `Flutter/ephemeral/.symlinks/plugins/record_darwin/macos`)
- record_macos (from `Flutter/ephemeral/.symlinks/plugins/record_macos/macos`)
- screen_retriever (from `Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos`)
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
Expand Down Expand Up @@ -148,8 +147,8 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
photo_manager:
:path: Flutter/ephemeral/.symlinks/plugins/photo_manager/macos
record_darwin:
:path: Flutter/ephemeral/.symlinks/plugins/record_darwin/macos
record_macos:
:path: Flutter/ephemeral/.symlinks/plugins/record_macos/macos
screen_retriever:
:path: Flutter/ephemeral/.symlinks/plugins/screen_retriever/macos
share_plus:
Expand Down Expand Up @@ -188,7 +187,7 @@ SPEC CHECKSUMS:
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
photo_manager: 4f6810b7dfc4feb03b461ac1a70dacf91fba7604
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
record_darwin: 1f6619f2abac4d1ca91d3eeab038c980d76f1517
record_macos: 937889e0f2a7a12b6fc14e97a3678e5a18943de6
screen_retriever: 59634572a57080243dd1bf715e55b6c54f241a38
share_plus: 76dd39142738f7a68dd57b05093b5e8193f220f7
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
Expand Down
24 changes: 12 additions & 12 deletions macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
7E2335674AA28E31A7EEBE87 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAE814E2540AB2A5F49FEB9F /* Pods_Runner.framework */; };
ADAC39872A06D93D00E07F8F /* whisper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ADAC39852A06D93D00E07F8F /* whisper.cpp */; };
ADAC39882A06D93D00E07F8F /* ggml.c in Sources */ = {isa = PBXBuildFile; fileRef = ADAC39862A06D93D00E07F8F /* ggml.c */; settings = {COMPILER_FLAGS = "-DGGML_USE_ACCELERATE"; }; };
AD38B4842B41C7A100618129 /* whisper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AD38B4812B41C7A100618129 /* whisper.cpp */; };
AD38B4852B41C7A100618129 /* ggml.c in Sources */ = {isa = PBXBuildFile; fileRef = AD38B4822B41C7A100618129 /* ggml.c */; };
ADAC398A2A06D97C00E07F8F /* LibWhisper.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADAC39892A06D97C00E07F8F /* LibWhisper.swift */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -74,12 +74,12 @@
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
A87512A16BAFE7C799AAEE04 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
AD38B4802B41C7A100618129 /* ggml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ggml.h; path = "whisper.cpp-1.4.2/ggml.h"; sourceTree = "<group>"; };
AD38B4812B41C7A100618129 /* whisper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = whisper.cpp; path = "whisper.cpp-1.4.2/whisper.cpp"; sourceTree = "<group>"; };
AD38B4822B41C7A100618129 /* ggml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ggml.c; path = "whisper.cpp-1.4.2/ggml.c"; sourceTree = "<group>"; };
AD38B4832B41C7A100618129 /* whisper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = whisper.h; path = "whisper.cpp-1.4.2/whisper.h"; sourceTree = "<group>"; };
AD4D50B4272DC22C00B0D18C /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = "<group>"; };
ADAC39822A06D93C00E07F8F /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
ADAC39832A06D93C00E07F8F /* ggml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ggml.h; sourceTree = "<group>"; };
ADAC39842A06D93C00E07F8F /* whisper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = whisper.h; sourceTree = "<group>"; };
ADAC39852A06D93D00E07F8F /* whisper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = whisper.cpp; sourceTree = "<group>"; };
ADAC39862A06D93D00E07F8F /* ggml.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ggml.c; sourceTree = "<group>"; };
ADAC39892A06D97C00E07F8F /* LibWhisper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LibWhisper.swift; sourceTree = "<group>"; };
BAE814E2540AB2A5F49FEB9F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EE88E1714354055D8612F843 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -167,11 +167,11 @@
ADAC39812A06D91900E07F8F /* whisper.cpp */ = {
isa = PBXGroup;
children = (
AD38B4822B41C7A100618129 /* ggml.c */,
AD38B4802B41C7A100618129 /* ggml.h */,
AD38B4812B41C7A100618129 /* whisper.cpp */,
AD38B4832B41C7A100618129 /* whisper.h */,
ADAC39892A06D97C00E07F8F /* LibWhisper.swift */,
ADAC39862A06D93D00E07F8F /* ggml.c */,
ADAC39832A06D93C00E07F8F /* ggml.h */,
ADAC39852A06D93D00E07F8F /* whisper.cpp */,
ADAC39842A06D93C00E07F8F /* whisper.h */,
ADAC39822A06D93C00E07F8F /* Runner-Bridging-Header.h */,
);
path = whisper.cpp;
Expand Down Expand Up @@ -360,8 +360,8 @@
buildActionMask = 2147483647;
files = (
ADAC398A2A06D97C00E07F8F /* LibWhisper.swift in Sources */,
ADAC39872A06D93D00E07F8F /* whisper.cpp in Sources */,
ADAC39882A06D93D00E07F8F /* ggml.c in Sources */,
AD38B4842B41C7A100618129 /* whisper.cpp in Sources */,
AD38B4852B41C7A100618129 /* ggml.c in Sources */,
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
Expand Down
40 changes: 16 additions & 24 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1811,58 +1811,50 @@ packages:
dependency: "direct main"
description:
name: record
sha256: "5c8e12c692a4800b33f5f8b6c821ea083b12bfdbd031b36ba9322c40a4eeecc9"
sha256: f703397f5a60d9b2b655b3acc94ba079b2d9a67dc0725bdb90ef2fee2441ebf7
url: "https://pub.dev"
source: hosted
version: "5.0.4"
record_android:
dependency: transitive
description:
name: record_android
sha256: "805ecaa232a671aff2ee9ec4730ef6addb97c548d2db6b1fbd5197f1d4f47a5a"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
record_darwin:
version: "4.4.4"
record_linux:
dependency: transitive
description:
name: record_darwin
sha256: ee8cb1bb1712d7ce38140ecabe70e5c286c02f05296d66043bee865ace7eb1b9
name: record_linux
sha256: "348db92c4ec1b67b1b85d791381c8c99d7c6908de141e7c9edc20dad399b15ce"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
record_linux:
version: "0.4.1"
record_macos:
dependency: transitive
description:
name: record_linux
sha256: "7d0e70cd51635128fe9d37d89bafd6011d7cbba9af8dc323079ae60f23546aef"
name: record_macos
sha256: d1d0199d1395f05e218207e8cacd03eb9dc9e256ddfe2cfcbbb90e8edea06057
url: "https://pub.dev"
source: hosted
version: "0.7.1"
version: "0.2.2"
record_platform_interface:
dependency: transitive
description:
name: record_platform_interface
sha256: "3a4b56e94ecd2a0b2b43eb1fa6f94c5b8484334f5d38ef43959c4bf97fb374cf"
sha256: "7a2d4ce7ac3752505157e416e4e0d666a54b1d5d8601701b7e7e5e30bec181b4"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
version: "0.5.0"
record_web:
dependency: transitive
description:
name: record_web
sha256: "687c843fb58a70c2735618163cd7b7ffbf845e7e75e1022c91156fc4877a2717"
sha256: "219ffb4ca59b4338117857db56d3ffadbde3169bcaf1136f5f4d4656f4a2372d"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "0.5.0"
record_windows:
dependency: transitive
description:
name: record_windows
sha256: "39998b3ea7d8d28b04159d82220e6e5e32a7c357c6fb2794f5736beea272f6c3"
sha256: "42d545155a26b20d74f5107648dbb3382dbbc84dc3f1adc767040359e57a1345"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
version: "0.7.1"
research_package:
dependency: "direct main"
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: lotti
description: Achieve your goals and keep your data private with Lotti.
publish_to: 'none'
version: 0.9.396+2306
version: 0.9.396+2307

msix_config:
display_name: LottiApp
Expand Down Expand Up @@ -126,7 +126,7 @@ dependencies:
radial_button: ^1.0.1

random_password_generator: ^0.2.1
record: ^5.0.4
record: 4.4.4
research_package: ^1.3.2
retry: ^3.1.0
rxdart: ^0.27.7
Expand Down

0 comments on commit d89b8b9

Please sign in to comment.