Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ChatGPT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
关振斌
ChatGPT
Commits
adf14af8
Commit
adf14af8
authored
Apr 06, 2023
by
skeyboy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tts语音适配iOS
parent
1610ec8c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
16 deletions
+10
-16
lib/package/chat_dash/src/widgets/message_list/message_list.dart
...kage/chat_dash/src/widgets/message_list/message_list.dart
+10
-16
No files found.
lib/package/chat_dash/src/widgets/message_list/message_list.dart
View file @
adf14af8
...
...
@@ -4,21 +4,15 @@ enum TtsState { playing, stopped, paused, continued }
class
ChartTTS
{
String
voiceName
;
String
locale
;
double
volume
;
double
speechRate
;
String
language
=
"
en-US
"
;
String
language
=
"
zh-CN
"
;
static
ChartTTS
tts
=
ChartTTS
();
ChartTTS
(
{
this
.
voiceName
=
"Karen"
,
this
.
locale
=
'en-AU'
,
this
.
volume
=
1.0
,
this
.
speechRate
=
1.0
})
{
ChartTTS
({
this
.
voiceName
=
"zh"
,
this
.
volume
=
1.0
,
this
.
speechRate
=
1.0
})
{
flutterTts
.
setLanguage
(
language
);
flutterTts
.
setVolume
(
volume
);
flutterTts
.
setSpeechRate
(
speechRate
);
flutterTts
.
setVoice
({
"name"
:
voiceName
,
"locale"
:
locale
});
}
final
FlutterTts
_flutterTts
=
FlutterTts
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment