Skip to content

Commit

Permalink
style: new chat form
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxinqi committed May 8, 2023
1 parent 816230d commit f74e096
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
1 change: 1 addition & 0 deletions src/hooks/useSpeechService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export const useSpeechService = ({ langs = <const>['fr-FR', 'ja-JP', 'en-US', 'z

recognizer.value.sessionStopped = (s, e) => {
console.log('\n Session stopped event.')
isRecognizing.value = false
recognizer.value.stopContinuousRecognitionAsync()
}

Expand Down
33 changes: 17 additions & 16 deletions src/pages/Home/components/NewChat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,20 @@ const previewSpeech = () => {
<label for="">备注</label>
<input v-model="desc" type="text">
</div>
<div flex>
<label for="">语音</label>
<div w-55 flex>
<ElCascader v-model="voiceValue" style="width: 220px;" :options="options" />
</div>
<div
class="flex ml-[-30px]"
>
<label for="">
场景预设</label>
<textarea v-model="presets" :rows="4" placeholder="system prompt..." />
</div>
<div flex>
<label for="">语速</label>
<label for="">语音</label>
<div w-55 flex>
<input v-model="rate" flex-1 type="range" step="0.1" min="0.1" max="2.0">
<span w-4 ml-1>{{ Number(rate).toFixed(1) }}</span>
<ElCascader v-model="voiceValue" filterable placeholder="select voice" style="width: 220px;" :options="options" />
</div>
</div>

<div class="ml-[-30px] relative center-y">
<div flex>
<label for="">语音预览</label>
Expand All @@ -127,15 +128,15 @@ const previewSpeech = () => {
</button>
</div>
</div>

<!-- todo -->
<div
class="flex ml-[-30px]"
>
<label for="">
场景预设</label>
<textarea v-model="presets" :rows="4" placeholder="system prompt..." />
<div flex>
<label for="">语速</label>
<div w-55 flex>
<input v-model="rate" flex-1 type="range" step="0.1" min="0.1" max="2.0">
<span w-4 ml-1>{{ Number(rate).toFixed(1) }}</span>
</div>
</div>
<!-- todo -->

<div center-y text-sm text-gray-500>
<i inline-block w-4 h-4 m-1 cursor-auto i-ic:baseline-lightbulb />
点击头像可更换头像
Expand Down

0 comments on commit f74e096

Please sign in to comment.