diff options
author | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-07-10 13:45:10 -0400 |
---|---|---|
committer | alyssaf16 <alyssa_feinberg@brown.edu> | 2024-07-10 13:45:10 -0400 |
commit | f7165ab3f0d9c652aea41c92aa4a820f2d5d6b94 (patch) | |
tree | fe28697d5d173caf2c2e944939704522b4488f5d /src | |
parent | 7155035307d774fdd7a19e871667be7147dbfa96 (diff) |
stuff
Diffstat (limited to 'src')
-rw-r--r-- | src/client/apis/gpt/GPT.ts | 4 | ||||
-rw-r--r-- | src/client/views/nodes/ComparisonBox.tsx | 30 |
2 files changed, 26 insertions, 8 deletions
diff --git a/src/client/apis/gpt/GPT.ts b/src/client/apis/gpt/GPT.ts index 568e28d02..0a4dc2423 100644 --- a/src/client/apis/gpt/GPT.ts +++ b/src/client/apis/gpt/GPT.ts @@ -64,8 +64,8 @@ const callTypeMap: { [type: string]: GPTCallOpts } = { pronunciation: { model: 'gpt-4-turbo', maxTokens: 4096, - temp: 0, - prompt: 'List unique differences between the pronunciation of the ', + temp: 0.3, + prompt: '', }, }; diff --git a/src/client/views/nodes/ComparisonBox.tsx b/src/client/views/nodes/ComparisonBox.tsx index 8b3b6578c..b28ef24ec 100644 --- a/src/client/views/nodes/ComparisonBox.tsx +++ b/src/client/views/nodes/ComparisonBox.tsx @@ -250,7 +250,8 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>() // console.log('PHONETIC TRANSCRIPTION: ' + DocCast(this._audio)[DocData]); // this.Document.audio = this._audio; console.log('Phonetic transcription: ' + DocCast(this.Document.audio).phoneticTranscription); - const phonTrans = DocCast(this.Document.audio).phoneticTranscription; + // const phonTrans = DocCast(this.Document.audio).phoneticTranscription; + const phonTrans = 's'; if (phonTrans) { this._inputValue = StrCast(phonTrans); console.log('INPUT:' + this._inputValue); @@ -261,12 +262,29 @@ export class ComparisonBox extends ViewBoxAnnotatableComponent<FieldViewProps>() }; askGPTPhonemes = async (phonemes: string) => { - const phon = 'w ʌ t ɪ z j ɔː ɹ n e ɪ m '; - const phon2 = 'h aʊ ɛ r j u t ʌ d eɪ'; - const question = - 'Consider all possible phonetic transcriptions of "she sells seashells by the sea shore" that is standard in speech without showing the user. Align the phonemes with each word based on what is similar; if it seems like a part of the word is missing, check the phonemes beforehand and after to see if they should be part of that word and reevaluate to see if those phonemes should be a part of that word. Note if a word or sound missing, including missing vowels and consonants. Compare the phonemes in each word with those phonetic transcriptions without displaying anything to the user: "' + + const phon = 'w ʌ ɪ z j ɔː ɹ n e ɪ m '; + const phon2 = 'h ʌ ɛ r j ʌ t ʌ d eɪ'; + const phon3 = 'ʃ eɪ oʊ s i ʃ oʊ z b aɪ ð ə s iː ʃ oʊ'; + const phon4 = 'k a m o e s t a s h ɔi'; + const phon5 = 'e l s e n a l'; + const question10 = + 'Break into syllables by putting some of the phonemes together if they create a syllable or alone if it does not in "ʃ eɪ oʊ s i ʃ oʊ z b a ɪ ð ə s iː ʃ oʊ". Then align the syllables with the words of "she sells sea shells by the sea shore". Multiple syllables can be part of one word. Then consider all possible phonetic transcriptions of "she sells seashells by the sea shore" that is standard in speech without showing the user. Align the phoneme syllables with each word based on what is similar; if it seems like a part of the word is missing, check the phonemes beforehand and after to see if they should be part of that word and reevaluate to see if those phonemes should be a part of that word. Note if a word or sound missing, including missing vowels and consonants. Compare the phonemes in each word with those phonetic transcriptions without displaying anything to the user. phonemes. If there is an additional word that does not match with the provided sentence, say so. For each word, if any letters mismatch and would sound weird in American speech and they are not allophones of the same phoneme and they are far away from each on the ipa vowel chat and that pronunciation is not normal for the meaning of the word, note this difference. If there is a sound missing, note that. If nothing is wrong, say "good job" for the word. Just so you know, "i" sounds like "ee" as in "bee", not "ih" as an "lick". Interpret "ɹ" as the same as "r". Interpret "ʌ" as the same as "ə". If "ɚ", "ɔː", and "ɔ" are options for pronunciation, do not choose "ɚ". Ignore differences with colons. Ignore redundant letters and the splitting of words since that is your issue, not the users.'; + const question11 = + "Consider all possible phonetic transcriptions of the sentence 'cómo' as commonly spoken. Compare these with provided phonetic transcriptions: " + + phon3 + + ". Align phonemes with each word to approximate its pronunciation without revealing details. Ensure correct syllable alignment and identify any missing sounds or mismatched vowels/consonants. Provide feedback per word on pronunciation accuracy. Note specific mismatches or missing sounds, and clarify pronunciation guidelines (e.g., 'i' sounds like 'ee'). Just so you know, 'i' sounds like 'ee' as in 'bee', not 'ih' as an 'lick'. Interpret 'ɹ' as the same as 'r'. Interpret 'ʌ' as the same as 'ə'. If 'ɚ', 'ɔː', and 'ɔ' are options for pronunciation, do not choose 'ɚ'. Ignore differences with colons. Ignore redundant letters and words and sounds and the splitting of words; do not mention this since there could be repeated words in the sentence.'"; + const questionEng = + 'Consider all possible phonetic transcriptions of the intended sentence “vamos por un café" that is standard in speech without showing the user. Compare the phonemes in each word with those phonetic transcriptions without displaying anything to the user: "' + phonemes + - '". If there is an additional word that does not match with the provided sentence, say so. For each word, if any letters mismatch and would sound weird in American speech and they are not allophones of the same phoneme and they are far away from each on the ipa vowel chat and that pronunciation is not normal for the meaning of the word, note this difference. If there is a sound missing, note that. If nothing is wrong, say "good job" for the word. Just so you know, "i" sounds like "ee" as in "bee", not "ih" as an "lick". Interpret "ɹ" as the same as "r". Interpret "ʌ" as the same as "ə". If "ɚ", "ɔː", and "ɔ" are options for pronunciation, do not choose "ɚ".'; + '". Steps to do this: Align the list phonemes with each word in the intended sentence by combining the phonemes to get a pronunciation that resembles the word in order. Individual phonemes can represent a word - they do not have to be combined. If it seems like a part of the word is missing, check the phonemes beforehand and after to see if they should instead be part of that word and reevaluate to see if those phonemes should be a part of that word; consider syllables of the words to do this alignment but do not process the letters in the wrong order. Do not use the same instance of a letter twice for the words - figure out where it belongs by evaluating which combinations with the letters before and after match better. Note if a word or sound missing, including missing vowels and consonants. If there is an additional word that does not match with the provided sentence, say so. For each word, if any letters mismatch and would sound weird in American speech and they are not allophones of the same phoneme and they are far away from each on the ipa vowel chat and that pronunciation is not normal for the meaning of the word, note this difference and explain how it is supposed to sound. If there is a sound missing, note that. If nothing is wrong, say "good job" for the word. Just so you know, "i" sounds like "ee" as in "bee", not "ih" as an "lick". Interpret "ɹ" as the same as "r". Interpret "ʌ" as the same as "ə". If "ɚ", "ɔː", and "ɔ" are options for pronunciation, do not choose "ɚ". Ignore differences with colons. Ignore redundant letters and words and sounds and the splitting of words; do not mention this since there could be repeated words in the sentence.'; + const question = + 'Consider all possible phonetic transcriptions of the intended sentence “la señal" that is standard in Spanish speech without showing the user. Compare the phonemes in each word with those phonetic transcriptions without displaying anything to the user: "' + + phon5 + + '". Steps to do this: Align the list phonemes with each word in the intended sentence by combining the phonemes to get a pronunciation that resembles the word in order. Individual phonemes can represent a word - they do not have to be combined. If it seems like a part of the word is missing, check the phonemes beforehand and after to see if they should instead be part of that word and reevaluate to see if those phonemes should be a part of that word; consider syllables of the words to do this alignment but do not process the letters in the wrong order. Only combine phonemes that are next to each other and do not take phonemes out of order. For example, if "al" is at the end, it should not be matched to "la" in the beginning. Do not use the same instance of a letter twice for the words - figure out where it belongs by evaluating which combinations with the letters before and after match better. Note if a word or sound missing, including missing vowels and consonants. If there is an additional word that does not match with the provided sentence, say so. For each word, if any letters mismatch and would sound weird in Spanish speech and they are not allophones of the same phoneme and they are far away from each on the ipa vowel chat and that pronunciation is not normal for the meaning of the word, note this difference and explain how it is supposed to sound. If there is a sound missing, note that. If nothing is wrong, say "good job" for the word. Ignore redundant letters and words and sounds and the splitting of words; do not mention this since there could be repeated words in the sentence. Do not make "θ" and "f" interchangable. Do not make "n" and "ɲ" interchangable. Do not make "e" and "i" interchangable.'; + const questionL = + 'Consider all possible phonetic transcriptions of "she sells seashells by the sea shore" that is standard in speech without showing the user. Align the phonemes with each word based on what is similar in order; if it seems like a part of the word is missing, check the phonemes beforehand and after to see if they should be part of that word and reevaluate to see if those phonemes should be a part of that word; consider syllables of the words to do this alignment but do not process the letters in the wrong order. Note if a word or sound missing, including missing vowels and consonants. Compare the phonemes in each word with those phonetic transcriptions without displaying anything to the user: "' + + 'ʃ eɪ oʊ s i ʃ oʊ z b aɪ ð ə s iː ʃ oʊ' + + '". If there is an additional word that does not match with the provided sentence, say so. For each word, if any letters mismatch and would sound weird in American speech and they are not allophones of the same phoneme and they are far away from each on the ipa vowel chat and that pronunciation is not normal for the meaning of the word, note this difference. If there is a sound missing, note that. If nothing is wrong, say "good job" for the word. Just so you know, "i" sounds like "ee" as in "bee", not "ih" as an "lick". Interpret "ɹ" as the same as "r". Interpret "ʌ" as the same as "ə" - do not distinguish between the schwa and "ʌ". If "ɚ", "ɔː", and "ɔ" are options for pronunciation, do not choose "ɚ". Ignore differences with colons. Ignore redundant letters and words and sounds and the splitting of words; do not mention this.'; const question5 = 'Consider all possible phonetic transcriptions of "how are you today" that is standard in speech without showing the user. Compare these phonemes with those phonetic transcriptions without displaying anything to the user: "' + phonemes + |